Posted by
Bracky on
Jan 18, 2023; 1:35pm
URL: http://official-rtab-map-forum.206.s1.nabble.com/Localization-after-mapping-session-using-lidar-only-tp9260p9294.html
I finnaly got to make my issue away with
<param name="Odom/Holonomic" type="bool" value="true"/><!-- keep true or issues -->
<param name="Odom/AlignWithGround" type="bool" value="false"/><!--keep false-->

However I get errors (of course..) from time to time :
[FATAL] (2023-01-18 11:23:52.798) Optimizer.cpp:198::getConnectedGraph() Condition (uContains(posesIn, fromId)) not met!
[FATAL] [1674037432.798395719]: [FATAL] (2023-01-18 11:23:52.798) Optimizer.cpp:198::getConnectedGraph() Condition (uContains(posesIn, fromId)) not met!
[ERROR] [1674037432.798550250]: Exception thrown while processing service call: [FATAL] (2023-01-18 11:23:52.798) Optimizer.cpp:198::getConnectedGraph() Condition (uContains(posesIn, fromId)) not met!
[ERROR] [1674037432.798738202]: Service call failed: service [/rtabmap/add_link] responded with an error: [FATAL] (2023-01-18 11:23:52.798) Optimizer.cpp:198::getConnectedGraph() Condition (uContains(posesIn, fromId)) not met!
[ERROR] [1674037432.798793885]: Failed to call /rtabmap/add_link service
But it also mostly works :
[ INFO] [1674037443.458105606]: rtabmap (158): Rate=1.00s, Limit=0.000s, Conversion=0.0046s, RTAB-Map=0.7958s, Maps update=0.0022s pub=0.0000s (local map=134, WM=134)
[ INFO] [1674037443.460892161]: Adding external link 156 -> 145
[ INFO] [1674037443.494630111]: Odom: ratio=0.436831, std dev=0.094351m|0.029837rad, update time=0.083330s
[ INFO] [1674037443.531810001]: rtabmap: Getting node data (1 node(s), images=false scan=true grid=false user_data=false)...
[ WARN] [1674037443.556314282]: Path for saving the point clouds is not a folder. Scans are not saved.
[ INFO] [1674037443.669526327]: rtabmap: Getting node data (1 node(s), images=false scan=true grid=false user_data=false)...
[ INFO] [1674037443.849866910]: Odom: ratio=0.433659, std dev=0.094810m|0.029981rad, update time=0.329669s
[ INFO] [1674037443.975003725]: Odom: ratio=0.442855, std dev=0.095170m|0.030095rad, update time=0.100286s
[ INFO] [1674037444.111455683]: Odom: ratio=0.440176, std dev=0.095499m|0.030199rad, update time=0.098759s
[ INFO] [1674037444.282366337]: Odom: ratio=0.439443, std dev=0.095807m|0.030297rad, update time=0.140219s
[ INFO] [1674037444.408549581]: Odom: ratio=0.436242, std dev=0.094072m|0.029748rad, update time=0.095668s
[ INFO] [1674037444.569299301]: Odom: ratio=0.436829, std dev=0.095291m|0.030134rad, update time=0.131878s
[ WARN] [1674037444.579889414]: Transform from odom to base_footprint was unavailable for the time requested. Using latest instead.
[ INFO] [1674037444.679140985]: Odom: ratio=0.436614, std dev=0.096745m|0.030594rad, update time=0.078610s
[ INFO] [1674037444.801188772]: Odom: ratio=0.436921, std dev=0.095501m|0.030200rad, update time=0.089146s
[ INFO] [1674037444.936520712]: Odom: ratio=0.447515, std dev=0.095891m|0.030323rad, update time=0.107696s
[ INFO] [1674037444.963486292]: rtabmap (159): Rate=1.00s, Limit=0.000s, Conversion=0.0059s, RTAB-Map=0.9807s, Maps update=0.0015s pub=0.0000s (local map=135, WM=135)
[ INFO] [1674037444.998408226]: Adding external link 157 -> 146
[ INFO] [1674037445.053921023]: Odom: ratio=0.442909, std dev=0.096624m|0.030555rad, update time=0.087345s
[ INFO] [1674037445.167331817]: Odom: ratio=0.437774, std dev=0.095377m|0.030161rad, update time=0.087631s
[ INFO] [1674037445.280415109]: Odom: ratio=0.436815, std dev=0.093472m|0.029559rad, update time=0.083295s
[ INFO] [1674037445.411078768]: Odom: ratio=0.439223, std dev=0.093751m|0.029647rad, update time=0.100422s
[ INFO] [1674037445.543368550]: Odom: ratio=0.431603, std dev=0.095126m|0.030082rad, update time=0.104199s
[ INFO] [1674037445.666114477]: Odom: ratio=0.441509, std dev=0.095763m|0.030283rad, update time=0.097233s
[ INFO] [1674037445.788450293]: Odom: ratio=0.438848, std dev=0.095244m|0.030119rad, update time=0.087815s
[ INFO] [1674037445.904624325]: rtabmap (160): Rate=1.00s, Limit=0.000s, Conversion=0.0041s, RTAB-Map=0.8446s, Maps update=0.0016s pub=0.0000s (local map=136, WM=136)
[ INFO] [1674037445.904850270]: rtabmap: Getting node data (1 node(s), images=false scan=true grid=false user_data=false)...
However I am forced to publish the tf of icp_odometry
<param name="publish_tf" type="bool" value="true"/>
because idk why the robot_localization package provides a wrong odometry with the above parameters. I built it as follow :

I'll try to update with a link to a rosbag, but it's snowing rn and I did not recorded one on the former test of rtabmap. Idk if you assembled both packages before, but my issue mostly comme from the poor link I've made between both packages and mistakes on tunning parameters either on rtabmap or robot_localization.
See :
test_all.launchcmr_lidarloop_params.yamllocalization_global.yaml or
localization_global.yamllocalization_local.yamlIf you have a rosbag to try it on, the :
- imu driver output topic is
/imu/data- gps =>
/ublox_node/fix- lidar =>
/ouster/points