Cloud map resolution for ROS

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

Cloud map resolution for ROS

maogic
Hi,

I need to perform some segmentation for the generated cloud map, but I found the resolution of the published /cloud_map is lower than the one I can get from the database file. I need to do the segmentation online so can I get a denser cloud map published?

I read in some other posts that I can achieve this by adjusting the "Grid/CellSize" parameter but I couldn't find it. The other parameter I thought might work is "decimation". I set it as 1 and the point cloud published to /voxel_cloud got much denser but the /cloud_map one seems not affected.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Cloud map resolution for ROS

matlabbe
Administrator
Hi,

/rtabmap/cloud_map resolution is indeed defined by Grid/CellSize parameter. This parameter is a rtabmap's library parameter (see this section to show all rtabmap's parameters) and can be set like this:
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap">
   <param name="Grid/CellSize" type="string" value="0.05"/>
   ...
</node>
or
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap" args="--Grid/CellSize 0.05">
   ...
</node>

Example using rtabmap.launch:
$ roslaunch rtabmap_ros rtabmap.launch args:="-d --Grid/CellSize 0.05" rtabmapviz:=false rviz:=true


$ roslaunch rtabmap_ros rtabmap.launch args:="-d --Grid/CellSize 0.01" rtabmapviz:=false rviz:=true


cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Cloud map resolution for ROS

maogic
Hi Mathieu,

I tried to change the Grid/CellSize as you instructed but it doesn't seem make a difference.

I added this line to the rtabmap.launch file as following and I tried number of 0.01, 0.05 and 0.5, but they all give the same result in RViz. I checked the /rtabmap/Grid/CellSize parameter and it shows the parameter was changed. BTW, I started rtabmap by launch the rgbd_mapping.launch. Am I missing something? Thanks!

<node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="$(arg output)" args="$(arg rtabmap_args)" launch-prefix="$(arg launch_prefix)">
      ...
      < param name="Grid/CellSize" type="string" value="0.05"/ >

Grid/CellSize = 0.01,


Grid/CellSize = 0.05,


Grid/CellSize = 0.5,




Reply | Threaded
Open this post in threaded view
|

Re: Cloud map resolution for ROS

matlabbe
Administrator
Hi,

The MapCloud display seems enabled in your screenshots, which would overlap the cloud_map cloud. So it is maybe why you don't see any differences.

Using a kinect:
$ roslaunch freenect_launch  freenect.launch depth_registration:=true

Here some examples:
$ roslaunch rtabmap_ros rtabmap.launch args:="-d --Grid/CellSize 0.01" rtabmapviz:=false rviz:=true


$ roslaunch rtabmap_ros rtabmap.launch args:="-d --Grid/CellSize 0.05" rtabmapviz:=false rviz:=true


$ roslaunch rtabmap_ros rtabmap.launch args:="-d --Grid/CellSize 0.1" rtabmapviz:=false rviz:=true


When going over 10 cm voxel, we should also set Grid/MinClusterSize to 0 to avoid filtering all points.
$ roslaunch rtabmap_ros rtabmap.launch args:="-d --Grid/CellSize 0.5 --Grid/MinClusterSize 0" rtabmapviz:=false rviz:=true

 
Reply | Threaded
Open this post in threaded view
|

Re: Cloud map resolution for ROS

maogic
Thanks Mathieu!

You are correct that the MapCloud overlapped the cloud_map cloud in my screenshots. I can see the cloud get coarser with a greater Grid/CellSize. However, it seems that the Grid/CellSize of 0.01 gives the finest cloud. Even I set the Grid/CellSize smaller than 0.01, the cloud doesn't seem getting finer. Is 0.01 the limit or it is just my feeling wrong?
Reply | Threaded
Open this post in threaded view
|

Re: Cloud map resolution for ROS

matlabbe
Administrator
It depends on your sensor. It won't interpolate points if you set voxel size smaller than the depth resolution of the sensor.