Multi robot rtab localization_pose

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

Multi robot rtab localization_pose

adhikaribibek87@gmail.com
I am using two robots for RTAB. For localization, i am subscribing from /rtabmap/localization_pose. How is it possible to get respective pose of two robots? I have tried putting unique namespaces infront of rtabmap node of rtab_slam pkg, but with the change in namespaces rtab does not function.
Reply | Threaded
Open this post in threaded view
|

Re: Multi robot rtab localization_pose

matlabbe
Administrator

If they are in SLAM mode both of them, you cannot get relative position between the robots on runtime. If they are in localization mode and using the same database to localize on, then it could be possible to subscribe to a "/robot1/rtabmap/localization_pose" and "/robot2/rtabmap/localization_pose". You may be able to use TF to get that relative pose if TF is correctly set for multi-robots on same ROS master.
Reply | Threaded
Open this post in threaded view
|

Re: Multi robot rtab localization_pose

adhikaribibek87@gmail.com
I am doing SLAM for my both robots, thus I wanted to get pose of both robots at the same time. So is it completely impossible to get respective pose from /rtabmap/localization_pose topic? Also, if I wanted to get respective pose using TF, that would left me with lot of drift errors with no back end optimization.
Reply | Threaded
Open this post in threaded view
|

Re: Multi robot rtab localization_pose

matlabbe
Administrator
If they are in same TF tree, you could lookup transform between "robot1/base_link" and "robot2/base_link" frames to get relative position between the robots. However in SLAM mode, as the robots won't detect online loop closures with other robots, you may add those static transforms "world->robot1/map" and "world->robot2/map" at start, but while each robot will detect their own loop closures in respective maps, the two maps would drift apart.

If you are interested in online multi-robot mapping, you may also check this project: https://github.com/MISTLab/Swarm-SLAM