Wrong Loop Closure in Outdoor Effect the Map

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Wrong Loop Closure in Outdoor Effect the Map

imran05
Hello,

I am using RTAB-Map for mapping an orchard environment. I’ve used RTAB-Map before for indoor and outdoor mapping, and it worked well. However, this time I ran an experiment in a field with artificial trees, and I’m facing problems.

RTAB-Map is detecting wrong loop closures because most of the detected features are from the background. I tried setting RGBD/OptimizeMaxError=0.1, which rejected the wrong loop closures, but the trajectory is still poor, and the map quality is bad.

Can anyone suggest which parameters I should adjust to improve the results? I am attaching the rosbag recorded during the experiment and the database for reference.
Rosbag: https://drive.google.com/file/d/1okPECevkLlV2g4kLIHLr_oDhx4pewcLF/view?usp=drive_link
Database: https://drive.google.com/file/d/18jIt8DMWybzQv1qtFAbJi13pDwYNY2Jx/view?usp=sharing

Reply | Threaded
Open this post in threaded view
|

Re: Wrong Loop Closure in Outdoor Effect the Map

matlabbe
Administrator
The database doesn't contain any loop closures, what you are seeing is probably visual odometry drift. I could not test "as is" your bag as the camera_info is not what rtabmap expects:
[ERROR] [1737327595.911208693, 1737093742.310247645]: The stereo baseline (-0.074953) should be positive 
(baseline=-Tx/fx). We assume a horizontal left/right stereo setup where the Tx (or P(0,3)) is negative in the right camera info 
msg.
That could probably fixed if the camera driver publishes the left camera_info with a positive P(0,3) (currently negative).

About the odometry drift, I think there would be enough good visual features on the ground. However, the biggest issue is that the stereo camera is poorly calibrated, there is a noticeable vertical disparity:

Reply | Threaded
Open this post in threaded view
|

Re: Wrong Loop Closure in Outdoor Effect the Map

imran05
That error is happening because the camera driver has a opposite camera positions in the depthairos driver, For removing that error i just replace thge left and right cameras. I am suing below command:
roslaunch rtabmap_launch rtabmap.launch \
    args:="--delete_db_on_start" \
    stereo:=true \
    left_image_topic:=/stereo_inertial_publisher/left/image_rect \
    right_image_topic:=/stereo_inertial_publisher/right/image_rect \
    left_camera_info_topic:=/stereo_inertial_publisher/right/camera_info \
    right_camera_info_topic:=/stereo_inertial_publisher/left/camera_info \
    imu_topic:=/stereo_inertial_publisher/imu/data \
    frame_id:=base_footprint \
    approx_sync:=true \
    approx_sync_max_interval:=0.001 \
    wait_imu_to_init:=true

For the camera, I calibrated it many times but i am still facing that problems.So, I will try to calibrate it agin.

Thank You
Reply | Threaded
Open this post in threaded view
|

Re: Wrong Loop Closure in Outdoor Effect the Map

matlabbe
Administrator
The depthai tool would calibrate with right camera as reference instead of left. That is fine, as long as it is reflected correctly in the camera_info generated. Maybe it is just a bug on how they publish the camera_info:
That could probably fixed if the camera driver publishes the left camera_info with a positive P(0,3) (currently negative).