Automatic multi-session mapping for RTABMap. [closed]
Hello,
I have RTABMap set up on Ubuntu 12.04, ROS Hydro, with a stereo camera pair. I also have an IMU, but it is not currently being used for pose estimation.
My issue is that when my camera moves too fast, the Stereo odometry loses track of where it is. Ideally I should return the camera to a position it has seen before, and it regains tracking.
In my application (SLAM on a UAV), this is not always feasible, especially since i am trying to achieve autonomous flying of the UAV.
I'd like to be able to start a "new session" of mapping, as and when my odometry loses track for a large amount of time (say 5 seconds), without having to bring my camera back to a known location. I want this map to be merged to my previously existing map. To do this online, here is a scheme I thought of -
- Launch RTAB in mapping mode.
- From another client node, subscribe to the odometry topic, and check it is a null transform for more than 10 consecutive transforms.
- If (2) is true, call the services backup, reset_odom / reset_odom_to_pose, and trigger_new_map in that order.
- Continue mapping.
I am not sure if this will work, because trigger_new_map probably deletes the old one. Additionally, this won't let me merge each "session" with the previous one online. I know rtabmap is by default in "multi-session" mode, is there a fault with my understanding? Any suggestions on how to do this?