How to integrate external map->odom transform into rtabmap?
Hi, I have a question about localization of a robot and integrating rtabmap_ros with an external localization source that provide map->odom transform.
I have an instance of the robot_localization package that combine information from wheel encoders and visual odometry to provide the odom->base_link transform.
Then there is another custom node that combine information from landmarks with the previous localization source and output a map->odom tf. The output position is in the map frame because it is not continous.
Moreover I have the rtabmap node that generates the map, but it also output the map->odom tf.
So my questions are:
- If I disable the map->odom publishing of rtabmap, to use only the one from the custom node, will rtabmap still be able to detect loop closure and optimize the map?
- There is a way to integrate correctly the map->odom tf published by the other node into rtabmap?
I found this question that is related: https://answers.ros.org/question/2256... But it is quite old and I don't know if now there is a better way to do this.
I am using ROS Noetic
Hopefully this is the answer you are looking for. AMCL and rtabmap are only to correct for errors in wheel odometry and visual odometry in your case. What you should be doing is the visual odometry + the wheel odometry node broadcasts odom -> base_link and rtabmap broadcasts map -> odom to adjust for errors. This is because rtabmap is very jumpy and would not be very reliable and wheel odometry + visual odometry is very smooth. this video explains this very well (watch starting at 3:22 ROS and SLAM video chapter. This is for ROS 2 not ROS 1) https://www.youtube.com/watch?v=ZaiA3...