ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

/rtabmap/cloud_map is only a 2D map

asked 2021-03-11 08:38:31 -0500

justastudent gravatar image

updated 2021-03-11 09:41:48 -0500

Hi! I ran the following demo for rtab-map ROS without changing anything:

$ roslaunch rtabmap_ros demo_robot_mapping.launch rviz:=true rtabmapviz:=false
$ rosbag play --clock demo_mapping.bag

In rviz, when I change the PointCloud2 from /voxel_cloud to /rtab_map/cloud_map, I get a point cloud of a 2D map with only red dots. Is /rtab_map/cloud_map not supposed to be a 3D point cloud?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-03-11 12:26:19 -0500

matlabbe gravatar image

When subscribing to a laser scan, by default it will generate a 2D map. Set Grid/FromDepth to true to use RGB-D camera to generate the map instead.

edit flag offensive delete link more

Comments

I see - however, if I set Grid/FromDepth to true, the occupancy grid then changes to be less accurate than if Grid/FromDepth is false. Is it possible to set Grid/FromDepth=true so that the cloud map is a 3D map, yet also generate an occupancy grid like this?

justastudent gravatar image justastudent  ( 2021-03-11 19:49:32 -0500 )edit

This is because the camera is seeing the ceiling, thus creating obstacles. If you want to get both, you have to reassemble the cloud with map_assembler: rosrun rtabmap_ros map_assembler mapData:=/rtabmap/mapData _regenerate_local_grids:=true --Grid/FromDepth true

matlabbe gravatar image matlabbe  ( 2021-03-11 23:04:21 -0500 )edit

I see, is it because generating the 2D occupancy grid projects the point cloud to the x-y plane, so parts of the ceiling become obstacles? Thank you so much for your help!

justastudent gravatar image justastudent  ( 2021-03-11 23:07:54 -0500 )edit

Yes, a workaround would be to filter the ceiling with Grid/MaxObstacleHeight = 1.5.

matlabbe gravatar image matlabbe  ( 2021-03-11 23:10:48 -0500 )edit

Got it - thank you so much!

justastudent gravatar image justastudent  ( 2021-03-12 09:09:26 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-03-11 00:41:59 -0500

Seen: 504 times

Last updated: Mar 11 '21