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 ^^^^