Login  Register

Re: RTAB SLAM using Wheel Encoder+imu+2d rotating Lidar

Posted by matlabbe on Apr 17, 2019; 11:23pm
URL: http://official-rtab-map-forum.206.s1.nabble.com/RTAB-SLAM-using-Wheel-Encoder-imu-2d-rotating-Lidar-tp5741p5747.html

Hi,

RTAB-Map can be used without a stereo camera with latest version from source, though there is no official tutorial to do that. Loop closure detection doesn't work as there is no camera. However, proximity detection is still working with scans, so some loop closures can be detected as long as odometry doesn't drift too much.

In your setup, the 2d laser should be converted to a 3d point cloud. For example, for each 360 rotation of the lidar, the scans could be accumulated using laser scan assembler. With latest rtabmap version, rtabmap_ros/point_cloud_assembler nodelet could be also used for that (with scans converted to PointCloud2 before). The assembled point cloud would be sent to rtabmap. The wheel encoders + IMU could give the odometry input to rtabmap.

To launch rtabmap subscribing only on point cloud and odometry:
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap">
   <param name="subscribe_depth"      type="bool"   value="false"/>
   <param name="subscribe_rgb"        type="bool"   value="false"/>
   <param name="subscribe_scan_cloud" type="bool"   value="true"/>

   <remap from="scan_cloud" to="assembled_scans"/> <!-- sensor_msgs/PointCloud2 -->
   <remap from="odom"       to="odometry"/> <!-- odometry from wheel encoders + IMU fusion -->
   ...
</node>
For maximum accuracy when accumulating a point cloud, the robot may stand still. If rtabmap_ros/point_cloud_assembler is used and odometry is quite accurate on short distance, we could feed it the odometry so that the scans are transformed accordingly to odometry when moving during the rotation.

cheers,
Mathieu