Point Cloud Collision Detection (PCL, FCL)
Hello,
I have two or more moving objects in my Point Cloud scene (being captured by a Kinect). I want to detect when the objects collide with each other live. How can I do this? I have looked into the fcl library, but i am not sure how to start/advance because I cannot find any tutorial/example code for doing this. Right now I have my objects as segments and converted the segments into octomap::OcTree.
Can someone please help me regarding this? Thanks!
Asked by nayan on 2021-08-03 04:28:23 UTC
Answers
As far as I know FCL supports some primitive geometrical shapes to check for collisions. Let’s say you detect your moving objects from the cloud, you can represent the detected objects with some primitive shapes such as box or cylinder then you can call collide callback from FCL.
I have done this in one of my recent project, I check collision between a 3D box representing robot body and octomap that is representing an envoirment.
Check out the function named isStateValid() https://github.com/NMBURobotics/vox_nav/blob/c52de8ae7b66d3653c8fbd9bf077f5a09bb2dac5/vox_nav_planning/src/plugins/se2_planner.cpp#L202
Don’t be scared that the code looks a bit complex, you can only focus FCL:: parts , and see how dimensions , translation and rotation components are set for collision objects. Overall I think It’s doing something very similar of what you describe.
Asked by Fetullah Atas on 2021-08-03 11:17:40 UTC
Comments
extract the objects from PCL, and add them in your scene, then add collision check between objects (default there is only robot-object collision checks): https://answers.ros.org/question/351846/collision-between-planning-scene-objects-eg-collisionobjecta-and-collisionobjectb/ There are other solutions, but your question doesn't give any information about your ROS setup.
Asked by crnewton on 2021-08-03 09:12:17 UTC