I am running ros_rtabmap and seeing good point cloud in rviz /rtabmap/mapData (but not from /rtabmap/cloud_map)
According to here, I should be able to run an rtabmap_ros/map_assembler node to subscribe to /rtabmap/mapData and generate a cloud. but I'm having some problems to do that.
Here is what I did: I added a rtabmap_ros/map_assembler node to the launch file.
<node pkg="rtabmap_ros" type="map_assembler" name="map_assembler">
<!-- <param name="Grid/FromDepth" type="string" value="false"/> -->
</node>
I can see that the process running
pas aux | grep assembler
avnerm 9233 0.9 2.1 1647040 171340 ? Ssl 13:46 0:02 /opt/ros/melodic/lib/rtabmap_ros/map_assembler __name:=map_assembler __log:=/home/avnerm/.ros/log/d6b29696-2bd8-11e9-a83c-74d02b912ce1/map_assembler-13.log
and generates a topic
rostopic list | grep -i cloud_map
/map_assembler/cloud_map
/rtabmap/cloud_map
However, nothing gets published
rostopic echo /map_assembler/cloud_map
...
According to here, map_assembler subscribes to rtabmap_ros/MapData
I see the following mapData related topics:
rostopic list | grep -i MapData
/mapData
/rtabmap/mapData
but not rtabmap_ros/MapData
I tried running map_assembler from the command line as stand alone. It uses these parameters:
/opt/ros/melodic/lib/rtabmap_ros/map_assembler
[ INFO] [1549921966.051079341]: /map_assembler(maps): map_filter_radius = 0.000000
[ INFO] [1549921966.051775099]: /map_assembler(maps): map_filter_angle = 30.000000
[ INFO] [1549921966.051807634]: /map_assembler(maps): map_cleanup = true
[ INFO] [1549921966.051827208]: /map_assembler(maps): map_negative_poses_ignored = true
[ INFO] [1549921966.051838948]: /map_assembler(maps): map_negative_scan_ray_tracing = true
[ INFO] [1549921966.051855113]: /map_assembler(maps): cloud_output_voxelized = true
[ INFO] [1549921966.051869112]: /map_assembler(maps): cloud_subtract_filtering = false
[ INFO] [1549921966.051887146]: /map_assembler(maps): cloud_subtract_filtering_min_neighbors = 2
[ INFO] [1549921966.056246560]: /map_assembler(maps): octomap_tree_depth = 16
My questions:
- What should I do to make rtabmap_ros/map_assembler node publish results?
- How can the cloud results be stored in file for post-processing? (I want to open the cloud map file later with e.g. standalone rtabmap so I can convert the cloud point to mesh)
Thanks,
Avner
EDIT1
I remapped mapData to /rtabmap/mapData, and run pcl_ros pointcloud_to_pcd and now rtabmap_ros/map_assembler node publishes results and the results are saved to files - good!
However, I see that with every message, a new .pcd file is created for the accumulated map, that increases in size. Is there an option to just save the final accumulated map and have a single .pcd file?
For your final question, if you are using rtabmap standalone to generate the mesh, you don't have to export the point cloud, just open the resulting database (default location is ~/.ros/rtabmap.db) in rtabmap standalone and do the export (like in step 7 of this tutorial):
At first, I was using rtabmap standalone with rtabmap.db to generate the mesh, but I it looks to me like the point cloud that is assembled in rviz (/rtabmap/mapData), is better.
This is why I wanted to work on the point cloud from /rtabmap/mapData instead of the point cloud that is assembled in rtrabmap (/rtabmap/cloud_map) that is stored in rtabmap.db
Could there be an inherent difference (i.e. using different algorithms) between the point cloud that is assembled in rviz, and the point cloud that is assembled in rtabmap? (or are the differences only due to mis-configuration like using misfit Grid/VoxelSize in rtabmap)
Thanks
Originally posted by Avner on ROS Answers with karma: 96 on 2019-02-11
Post score: 0