Re: External Odometry integration

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/External-Odometry-integration-tp11047p11055.html

Hi AlmogT

Are there any examples of a similar setup? For example, a launch file that shows how to integrate external odometry with RTAB-Map?
It would be similar to what you did, just start rtabmap node with odom topic remapped to your odometry topic, or set odom_frame_id to use TF. In both cases, your VIO node should provide corresponding TF of the odom topic.

Given the LiDAR's limited 80° FOV, are there recommended parameters or techniques to improve scan matching or overall map quality?
It depends at which level you need to improve scans registration. If your VIO is accurate enough, you may only need to care about loop closure detection. Loop closure detection only works if you provide stereo or RGB-D input at the same time. With Reg/Strategy=1, a first visual guess will be computed, then refined with ICP using your lidar data.

If VIO is not accurate enough and you need to do scan registration between consecutive scans, then you could enable RGBD/NeighborLinkRefining. Note that you have to setup appropriately the ICP parameters to make it work efficiently.

Should I provide IMU data to RTAB-Map even though it’s already used in the VIO? Would this enhance mapping accuracy or risk introducing redundant/noisy data?
No need, but if your VIO is always aligned with gravity, you can enable Mem/UseOdomGravity so that the map optimization stays aligned with gravity.

Any key RTAB-Map parameters you recommend tuning for this type of hybrid setup? (e.g., memory management, keyframe thresholds, sensor fusion settings)
If you are gonna sync lidar + stereo camera, you can enable "odom_sensor_sync" to adjust better where the frames should be when sensors have different timestamps. If you want to provide stereo data, use rtabmap_util/stereo_sync or rtabmap_util/rgbd_sync node, then enable subscribe_rgbd for rtabmap node and connect the rgbd_image topic.

My stereo cameras are approximately synchronized (within a few milliseconds). How should I feed them into RTAB-Map? Do I need to insert a synchronization node between the image topics?
Yes, use rtabmap_util/stereo_sync or rtabmap_util/rgbd_sync node as explained in previous point.

However, with this setup, I’m currently getting a poor-quality map — the map is sparse, inconsistent, and not well-aligned with the environment. I'm not sure if the issue is related to TF frames, sensors sync, or odometry integration.
If you can share a database showing the misalignment you are seeing, that could be helpful. When dealing with multiple sensors, make sure their timsetamps are synchronized with same clock (e.g., system clock) and the TF between the sensors is accurate (may require extrinsics calibration in some cases).