Exporting poses in map vs. odom frame

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

Exporting poses in map vs. odom frame

osbjo
I have a question that I haven't been able to answer myself.

I'm running RTAB-Map in mapping mode with the Rawseeds dataset, sequence Bicocca_2009-02-25b which contains data from a suite of sensor, including a stero camera, a short range 2D-LiDAR, wheel encoder odometry and an IMU. When I map with the encoder odometry and IMU enabled, the resulting trajectories look vastly different in the map fame vs. the odom frame.

I should be noted that loop closures have been turned off but map optimisation is still turned on. What I cannot wrap my head around is the fact that even though external odometry is used, "bad" building of the map still influences the trajectory. I would think that if you have external odometry, the position it gives would be seen as "true" and that the map would be re-shaped to fit that, not the other way around. I have not found any explanation to this in the source code, or in the paper; RTAB-Map as an open-source lidar and visual simultaneous localization and mapping library for large‐scale and long‐term online operation.

If there is any information on this I would be grateful to learn it!

 
                                                  ^^^^ In the map frame ^^^^


                                                  ^^^^ In the odom frame ^^^^
Reply | Threaded
Open this post in threaded view
|

Re: Exporting poses in map vs. odom frame

matlabbe
Administrator
If you are feeding IMU to rtabmap, it may add gravity constraints to the graph and re-optmize with them. You can launch rtabmap with parameter 'Optimizer/GravitySigma': '0' to see if there is a difference (this will make it ignore the IMU). Other option is to not feed imu to rtabmap node.

Otherwise, if you can share the database, it could be easier to debug.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Exporting poses in map vs. odom frame

osbjo
EDIT: I could not upload the database as it was too big, but here is a link to the database uploaded to my Google Drive seq2-lc-map.db

Hi Mathieu!

I tried both to set GravitySigma to 0, and to remove the IMU altogether, but the issue still persisted. I have attached the database with all sensors turned on. I have run the setup both with and without loop closure turned on, but the error is the same in both cases.
Reply | Threaded
Open this post in threaded view
|

Re: Exporting poses in map vs. odom frame

matlabbe
Administrator
That database has IMU and loop closures (here optimized vs not optimized):


After removing loop closures and setting Optimizer/GravitySigma to 0, there is still a slight difference between optimized or not but it is very low (here optimized vs not optimized).


However, the biggest problem is that images received on rtabmap side are not rectified, at least not stereo rectified. We can see a lot of disparity in y. FYI I used rtabmap-databaseViewer to analyze the data.


That would likely cause bad loop closures, thus bad map optimization. That could explain why the trajectory in map frame is worst than odom frame.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Exporting poses in map vs. odom frame

osbjo
Hmm. I have rectifying the images using the "image_pipeline/stereo_image_proc" and and fed those images to rtabmap, so the fact that they are not stereo rectified is a bit odd and I need to look in to that. How did you get the view with the overlayed images to discern that the images were not rectified? I cannot find that view in the database viewer.

Oskar
Reply | Threaded
Open this post in threaded view
|

Re: Exporting poses in map vs. odom frame

matlabbe
Administrator
It should be in the main image view widgets, you may have to check "Show depth image" checkbox (right-click menu), which would be the right image for stereo.
Reply | Threaded
Open this post in threaded view
|

Re: Exporting poses in map vs. odom frame

osbjo
I found it now, thank you!
Reply | Threaded
Open this post in threaded view
|

Re: Exporting poses in map vs. odom frame

osbjo
Turned out to be bad rectification parameters from the calibration data I had. Recalculated the rectification parameters and updated the camera_info for both cameras. Did not fully make the images overlap, but bettered the quality of my the map.