Setting maximum cloud depth from cloud_map topic

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Setting maximum cloud depth from cloud_map topic

blue_ringed_octopus
hello, sorry to bother again
I'm writing a script(in python) to get the final pointcloud from rtabmap to process.
i came across this post
https://answers.ros.org/question/250528/rtabmap-how-to-save-registered-3d-point-cloud/
and I set up my script as such, I first setup the listener to cloud_map then I call the publish map service. I want to set the max_depth as mention in the post but i'm not sure where should i set it, i know i can set it in rviz and rtabmapviz but those parameters only affect their own pointcloud visualization. I tried to set it in the launch file but it doesn't seems to do anything and it is not a parameter in the parameter list on roswiki. Any suggestions? thank you very much  
 
Reply | Threaded
Open this post in threaded view
|

Re: Setting maximum cloud depth from cloud_map topic

matlabbe
Administrator
In the post it is written cloud_max_depth. The new parameter is called Grid/RangeMax, but the older approach should still work with a warning (telling you to use the new parameter name).
Reply | Threaded
Open this post in threaded view
|

Re: Setting maximum cloud depth from cloud_map topic

blue_ringed_octopus
Are these parameters associated with the occupancy map instead of the point cloud?

After setting the FromDepth and RangeMax parameter, rtabmap change the occupancy map from lidar reading to camera reading, but if I don't set the fromdepth the cloud_map topic output would be the 2D point cloud from the lidar

How do I keep the occupancy map from lidar but have the cloudmap output be point cloud from the RGBD camera
Reply | Threaded
Open this post in threaded view
|

Re: Setting maximum cloud depth from cloud_map topic

matlabbe
Administrator
Hi,

the Grid parameters will affect cloud_map as well as the occupancy grid. The occupancy grid is actually created from the cloud_map.

How do I keep the occupancy map from lidar but have the cloudmap output be point cloud from the RGBD camera
it is not possible.

You would need to keep rtabmap node using the lidar. To get the 3D point cloud, you would need to add a map_assembler node subscribed to /rtabmap/mapData with "regenerate_local_grids" parameter set to true. By default Grid/FromDepth is true on that node. Example with demo_mapping.launch
roslaunch rtabmap_ros demo_robot_mapping.launch rviz:=true rtabmapviz:=false
rosbag play --clock demo_mapping.bag
rosrun rtabmap_ros map_assembler _regenerate_local_grids:=true mapData:=/rtabmap/mapData
There would be a topic called /map_assembler/cloud_map. Here is that cloud from depth images with the occupancy grid created from scans: