Login  Register

Re: Realtime Map Merger Improvements

Posted by derektan1995 on Jul 21, 2021; 12:12pm
URL: http://official-rtab-map-forum.206.s1.nabble.com/Realtime-Map-Merger-Improvements-tp8200p8353.html

Hi Mathieu,

Thanks for the reply! Using the prompts you given, I played around a little and managed to make it work. I did this by using manually adding a User-Defined link (kUserClosure) between the starting poses of each robot. I tried adding a Global Loop closure (kGlobalClosure) and that works well too.

I am now trying to optimize the map merger code for speed. The final goal would be similar to the 3d map reconstruction from a single robot, where each update can be performed within the specified 1s update rate. There are 2 approaches to map merger that I have explored thur far:


Method 1: Reseting the robot's memory prior to each map merger attempt

1) Map merger node receives mapData from both robots
2) Reset rtabmap's memory
3) Add & process robot1's nodes first, then robot2's nodes, and so on.
4) Map Manager retrieves and publishes map

The map merger process here works well. This method is significantly slower because it takes a long time to process all of the mapData's nodes from the beginning for each map merger attempt. So method 2 seeks to address this.


Method 2: Gradually accumulate robots' mapData nodes without any memory reset (Code is similar to the one on the github page here)

1) Map merger node receives mapData from both robots
3) Add & process only new nodes (robot1's nodes first, then robot2's nodes, and so on).
4) Map Manager retrieves and publishes map

This method is significantly faster since it removes the need to re-process a large number of nodes. However, I am unsure why old portions of my map keeps disappearing. Old portions of the map reappears only after a loop closure is detected, but very soon after, the same issue would resurface. This was why I asked the question in this post.

Here is a video illustrating that issue: Video of Old Map Disappearing
Database file: map_merge_disappearing_old_maps.db

I wonder if there is there any way for us to prevent the issue of disappearing portions of the map? The final goal would be the 3d map reconstruction from a single robot, where each update can be performed within the specified 1s update rate. I wonder if that is possible?

Much Thanks,
Derek