Re: Seeking advice for merging/deskewing lidar scans from multiple 2-d lidars
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Seeking-advice-for-merging-deskewing-lidar-scans-from-multiple-2-d-lidars-tp10767p10768.html
Hi Jeonghwan,
My answer would be very similar to the third option from this post:
http://official-rtab-map-forum.206.s1.nabble.com/Using-multiple-lidars-with-rtabmap-td10172.html :
Do you have wheel odometry at higher frame rate than 33 Hz and that is relatively accurate for 30 ms? That could be useful to deskew the scans and assemble them together in same frame (e.g., base_link). That could be done with a combination of rtabmap_util/lidar_deskewing and rtabmap_util/point_cloud_aggregator (and maybe pointcloud_to_laserscan node to feed a 2D scan instead of 3D point cloud), then feed resulting cloud to rtabmap/icp_odometry. Other option to combine the scans is using ira_laser_tools, though not sure it account for displacement between the scan timestamps (though it may be ignored as scan rate is high and if the robot doesn't very fast motions). In all cases, you may end up with a cloud or scan with frame_id in the middle of the robot (e.g., base_link), so the ray tracing in the map will be done from that point instead of each lidar point of view. For the static global map it can be not too bad, however if you are going to use navigation stack, I would feed the lidar independently to local/global costmaps.
I would add that only
rtabmap_util/lidar_deskewing and
rtabmap_util/point_cloud_aggregator may be used. To make sure icp_odometry and rtabmap nodes process the resulting PointCloud2 like a laser scan, you can set
scan_cloud_is_2d parameter for both nodes.
For deskewing outside icp_odometry node, this approach requires an external fixed frame (e.g., wheel odometry) that is accurate enough under the lidar rotation time.
Without an external fixed frame, icp_odometry would need to be updated to support more than one lidar to deskew based on a constant motion model.
EDIT: If you don't have wheel odometry but you have an IMU, it is possible to make a "fixed" frame from it with
rtabmap_util/imu_to_tf node. rtabmap_util/lidar_deskewing won't be able to deskew along translation, but at least the rotation will be deskewed, which may be enough.
Regards,
Mathieu