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

Revision history [back]

click to hide/show revision 1
initial version

Hi,

The rtabmap_ros/GetMap service returns map data as a graph, not a point cloud. You can however subscribe to /rtabmap/cloud_map topic (which is a sensor_msgs/PointCloud2) to get the point cloud. With pcl_ros, you can save to PCD format (and convert to PLY):

 rosrun pcl_ros pointcloud_to_pcd input:=/rtabmap/cloud_map
 pcl_pcd2ply input.pcd output.ply

If you connect after mapping, call the service rtabmap_ros/PublishMap so that rtabmap will regenerate the map's cloud and send it back on the cloud_map topic. Parameters for cloud generation by rtabmap can be found on the ROS wiki with prefix cloud_ (e.g., cloud_voxel_size).

Note that in rtabmapviz you can decrease the resolution of the point clouds (increase voxel size) to save memory when exporting.

cheers