Re: 3D mapping cloud map for localization and 2D grid map for global costmap
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/3D-mapping-cloud-map-for-localization-and-2D-grid-map-for-global-costmap-tp7363p7433.html
Hi,
you are using the launch file here:
https://github.com/introlab/rtabmap_ros/blob/master/launch/tests/test_velodyne.launchIn this one, we can optionally add imu data to help with scan matching. /rtabmap/odom is lidar point matching. The guess frame from imu is used for scan matching (when used). This sets the current rotation of the latest scan, then ICP is done.
With use_imu:=true, you would have (with frame_id=base_footprint):
Map --> Odom --> base_footprint_stabilized --> base_footprint --> base_link --> velodyne --> imu_link
To optimize on Z axis against gravity, you should subscribe to imu topic and add Optimizer/GravitySigma=0.3 to rtabmap node:
<node pkg="rtabmap_ros" type="rtabmap" ...
<param name="Optimizer/GravitySigma" type="string" value="0.3"/>
<remap from="imu" to="$(arg imu_topic)"/>
</node>
I updated the original launch file for reference:
https://github.com/introlab/rtabmap_ros/commit/962ef3b312c86ddcb85769a4f60226999fd806f4If your imu gives only gyro and accelerometer, you can use a
madwwick filter to compute the quaternion for rtabmap.
cheers,
Mathieu