Are you trying to plan a manipulator path between point cloud clusters, or are you trying to navigate a mobile robot between two obstacles?
If you're trying to plan a manipulator, use MoveIt and add collision objects to your scene that correspond to the location of the clusters. Your manipulator will automatically plan around them.
If you're trying to move a mobile robot, take a look into SLAM for automatic collision avoidance and mapping.
You should be able to use PCL to find the bounding boxes of two point clouds and then calculate the minimum distance between them. This would be your gap distance.
Originally posted by Adam Allevato with karma: 194 on 2015-05-01
This answer was ACCEPTED on the original site
Post score: 0
Original comments
Comment by dmngu9 on 2015-05-02:
already done the bounding box. but it doesnt give me good result. especially, when i have a chair with a gap underneath, the box includes everything. its not a very optimal approach
Comment by Adam Allevato on 2015-05-03:
If your bounding box includes everything, then you're not looking for the distance between two clusters as you said above. I'm trying to answer the original question - a gap between two clusters.
As I said above, look into SLAM-based nav: http://wiki.ros.org/navigation/Tutorials