ROS 3d object surface detection

asked 2016-09-17 07:30:20 -0500

jacksonkr_ gravatar image

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.

edit retag flag offensive close merge delete

Comments

1

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

matlabbe gravatar image matlabbe  ( 2016-09-19 08:50:30 -0500 )edit

@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?

jacksonkr_ gravatar image jacksonkr_  ( 2016-09-19 10:21:00 -0500 )edit
1

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.

matlabbe gravatar image matlabbe  ( 2016-09-19 12:00:39 -0500 )edit

@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?

jacksonkr_ gravatar image jacksonkr_  ( 2016-09-19 15:16:05 -0500 )edit
1

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.

matlabbe gravatar image matlabbe  ( 2016-09-19 16:12:04 -0500 )edit
1

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.

matlabbe gravatar image matlabbe  ( 2016-09-19 16:13:15 -0500 )edit

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?

jacksonkr_ gravatar image jacksonkr_  ( 2016-09-19 18:18:08 -0500 )edit
1

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.

matlabbe gravatar image matlabbe  ( 2016-09-20 12:06:35 -0500 )edit