0
$\begingroup$

Rosanswers logo

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?


Originally posted by justastudent on ROS Answers with karma: 3 on 2021-03-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by matlabbe with karma: 6409 on 2021-03-11

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by justastudent on 2021-03-11:
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?

Comment by matlabbe on 2021-03-12:
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

Comment by justastudent on 2021-03-12:
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!

Comment by matlabbe on 2021-03-12:
Yes, a workaround would be to filter the ceiling with Grid/MaxObstacleHeight = 1.5.

Comment by justastudent on 2021-03-12:
Got it - thank you so much!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.