introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
986 stars 556 forks source link

Is there a way to align gridmaps? #900

Closed mrtnbm closed 1 year ago

mrtnbm commented 1 year ago

Hello,

I need to compare different grid maps from different setups. In order to do this I need aligned (parallel to image border) grid maps. They don't need to be perfectly aligned, it would also work if all grid maps have the same orientation in the picture.

For example, with Marker/priors I got a fixed orientation: it_m11_n_aConverted Without Marker/Priors its hard to align them: m11_o_aConverted

I've got it working by using Marker/Priors, which also transforms the grid in the same orientation every time and thus I could compare them easily by just cropping some parts.I need to do this for non marker setups as well and manually adding a transform between t265_odom_frame/pose_frame and map didn't work however.

Also, is there a way to limit the maximum distance in which cells are still occupied? Some lidar rays that are casted through the window (see picture) will measure the outside environment and with that the grid map gets much bigger. Should I just limit the lidar range or is there a Grid param for this? I saw that there is indeed Grid/RangeMax but that doesn't seem to limit the cell occupation or the range in general. png

Best regards, mb

matlabbe commented 1 year ago

Grid/RangeMax should limit the size of the local occupancy grid. You can use rtabmap-databaseViewer, open Core Parameters panel, select Grid group, change parameters and click on Edit->Regenerate all local grids. This is a quick way to see the effect of each parameter. You can open the 3D view to check individual node results.

Note also that there is a new rotation slider on Graph View in rtabmap-databaseViewer to rotate the grid.

mrtnbm commented 1 year ago

Hey Matlabbe,

thank you for the help! Sorry, didn't see your message.