In this tutorial, I’m gonna show you how to do object recognition and 6DOF pose estimation in real-time based on Linemod algorithm with ROS and PCL pointcloud. First, you need to install ork:
1 |
sudo apt-get install ros-indigo-object-recognition-ros-visualization ros-indigo-object-recognition-msgs ros-indigo-object-recognition-core |
Then add the model of your object for tracking to Couch DB:
1 |
rosrun object_recognition_core object_add.py -n coke -d "A universal can of coke" --commit |
1 |
rosrun object_recognition_core mesh_add.py <YOUR_OBJECT_ID_FROM_PREVIOUS_STEP> /home/behnam/ork_tutorials/data/coke.obj --commit |
You need to install Kinect driver, if you don’t know how, follow my tutorial about that.
1 |
roslaunch openni_launch openni.launch |
1 |
rosrun rviz rviz |
1 |
rosrun rqt_reconfigure rqt_reconfigure |
And select /camera/driver from the drop-down menu. Enable the depth_registration checkbox. Now go back to RViz, and change your PointCloud2 topic to /camera/depth_registered/points.
1 |
rosrun object_recognition_core detection -c `rospack find object_recognition_linemod`/conf/detection.ros.ork |
Hello,
I am trying to do the same thing but I am getting many false detections. Did you faced any problems like this?
Also I check the coke.stl mesh file which is uploaded for training has very small dimension (approx 0.01 mm). If I have to do training of different objects than do I have to reduce the object size in .stl file. Are there any guidelines of how the model should be in STL file.
It would be great if you can repky to my questions or let me know if you need any further information.
Thanks
Hi Avinash, Sorry for late reply, you have to keep in mind this approach based on texture and model, so the coke can that you are using for object recognition should be same as the one in the training set, i.e if you have used the CAD model coming with ORK for you training, you should use red cola can (300 ml) and not diet one which is black and has other texture or 200 ml which has other dimension. Also, try to use “coke.obj” instead of “coke.stl”. My experience: this approach is not very robust and the code is… Read more »
Hi, I’m trying to use Ork linemode but I need to use a Kinect One (Kinect v2). I had install iai_kinect2 and libfreenect2 packets in order ti work with Kinect v2 and ROS. Unfortunatly there were any succesfull result. The Kinect shows point Cloud of the room the my coke can but It does not detect it and linemode gives a abort core dump. Have you ever try Ork with Kinect v2? Have you any suggests or codes ti try?
Thanks for four kindness and attention.
Hi, I can give you a couple of tips:
1)Kinect one I guess is still is not compatible with Opencv3. when I was working on that it was mentioned that it doesn’t work with opencv3, so check it out and remove any trace of opencv3.
2)This algorithm is very sensitive to background noise and as you can see I’m not holding the coke in my hand otherwise the algorithm fails.
3) I have used another 6DOF pose estimation algorithm in here, have you try it yet? https://ros-developer.com/2017/05/15/object-recognition-and-6dof-pose-estimation-with-pcl-pointcloud-and-ros/
oh btw this is also a good work https://github.com/lucatlp87/KukaVision
but remember PCL 1.7 has some problem with ourcvfh and use PCL1.8.
good luck.