Robotics StackExchange | Archived questions

ROS 3d object surface detection

I'm using RTABMAP as my base application. RTABMAP has a topic which puts out 3d data of the surrounding environment.

Is there a ROS program I can use to detect the surface of something I'm scanning? Let me give you a theoretical example:

Let's say I'm wanting to scan the surface of an entire wall. Once my robot detects the wall it looks for all corners of the wall until it's found all four at which point it stops looking around.

Is there a program, or at least a collection of code out there that already does this? Worst case I'll write my own but I'm hoping to leverage work that is already out there.

Asked by jacksonkr_ on 2016-09-17 07:30:20 UTC

Comments

PCL can be used to detect planes: http://pointclouds.org/documentation/tutorials/planar_segmentation.php

Asked by matlabbe on 2016-09-19 08:50:30 UTC

@matlabbe Yes, I plan to use that. My initial plan was to add a branch to RTABMAP on github but there has to be a more compartmentalized way. Perhaps listening to the cloud_map topic and doing the detection there? That seems like it will result in a performance loss though. Thoughts?

Asked by jacksonkr_ on 2016-09-19 10:21:00 UTC

You can subscribe to cloud_map to get a point cloud directly or subscribe to mapData and reconstruct the point cloud in your node like what map_assembler does.

Asked by matlabbe on 2016-09-19 12:00:39 UTC

@matlabbe If my map gets quite large (up to 30 minute scans) this sounds like it will drown my performance. Is there a way you would recommend accessing the same memory RTABMAP is using to hold the cloud_map?

Asked by jacksonkr_ on 2016-09-19 15:16:05 UTC

If you don't always need the whole map, you may want to subscribe to cloud_map only when you want to process it, to avoid rtabmap always publishing it. Also, maybe just the current sensor's cloud has enough information for processing.

Asked by matlabbe on 2016-09-19 16:12:04 UTC

rtabmap doesn't generate a cloud if no one is subscribed to cloud_map. It is not a waste of memory if you subscribe to mapData and reconstruct the point cloud on your side.

Asked by matlabbe on 2016-09-19 16:13:15 UTC

The ROS_MASTER subscribes to the cloud_map but all object processing needs to be done on both the robot and the master. Would you you still advise me to program on the robot itself to create a copy of cloud_map in a different ROS program or should I branch RTABMAP so I can access the map raw?

Asked by jacksonkr_ on 2016-09-19 18:18:08 UTC

You could branch rtabmap_ros, but you will see that in the code the cloud is created/assembled outside the actual mapping process. Creating a node subscribing to mapData and assemble it will result in exactly the same memory used, but you have access directly to PCL cloud memory in that node.

Asked by matlabbe on 2016-09-20 12:06:35 UTC

Answers