Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A problem from SVM Training with my own pcd data #9

Open
FransicsXu opened this issue Jun 20, 2018 · 1 comment
Open

A problem from SVM Training with my own pcd data #9

FransicsXu opened this issue Jun 20, 2018 · 1 comment

Comments

@FransicsXu
Copy link

Just follow the wiki tutorial I use the methon A
Method A
Preparations:
Each point cloud file needs to be called obji.pcd where i goes from 0 to num_files
pcd_directory is the location of the directory plus the root name of the training files, e.g., /home/userA/data/obj.
Training:
$ rosrun agile_grasp train_svm num_files pcd_directory/obj svm_filename [plots_hands] [num_samples] [num_threads]

So I write the command in terminal as follows:
rosrun agile_grasp train_svm 100 /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj svm_cube false 200 12

the pcd files directory is /home/xkx/agile_grasp_ws/src/agile_grasp-master/data
this is my pcd data and their names
1

However, I get some of the problem:
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj78 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj78l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj78l_reg.pcd
78) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj79 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj79l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj79l_reg.pcd
79) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj80 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj80l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj80l_reg.pcd
80) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj81 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj81l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj81l_reg.pcd
81) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj82 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj82l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj82l_reg.pcd
82) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj83 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj83l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj83l_reg.pcd
83) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj84 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj84l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj84l_reg.pcd
84) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj85 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj85l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj85l_reg.pcd
85) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj86 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj86l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj86l_reg.pcd
86) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj87 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj87l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj87l_reg.pcd
87) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj88 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj88l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj88l_reg.pcd
88) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj89 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj89l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj89l_reg.pcd
89) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj90 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj90l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj90l_reg.pcd
90) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj91 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj91l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj91l_reg.pcd
91) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj92 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj92l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj92l_reg.pcd
92) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj93 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj93l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj93l_reg.pcd
93) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj94 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj94l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj94l_reg.pcd
94) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj95 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj95l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj95l_reg.pcd
95) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj96 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj96l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj96l_reg.pcd
96) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj97 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj97l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj97l_reg.pcd
97) # hands: 0
Creating training data from file /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj98 ...
[pcl::PCDReader::readHeader] Could not find file '/home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj98l_reg.pcd'.
Couldn't read pcd_filename_left file: /home/xkx/agile_grasp_ws/src/agile_grasp-master/data/obj98l_reg.pcd
98) # hands: 0
Training the SVM ...
Converting 0 training examples (grasps) to images
OpenCV Error: Bad argument (train data must be floating-point matrix) in cvCheckTrainData, file /build/buildd/opencv-2.4.8+dfsg1/modules/ml/src/inner_functions.cpp, line 857
terminate called after throwing an instance of 'cv::Exception'
what(): /build/buildd/opencv-2.4.8+dfsg1/modules/ml/src/inner_functions.cpp:857: error: (-5) train data must be floating-point matrix in function cvCheckTrainData

How can I solve this problem??
thx!!!

@FransicsXu
Copy link
Author

Hello ,did anyone meet this problem, my hands are tied

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant