Re: Memory management in localization mode

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Memory-management-in-localization-mode-tp9886p10007.html

Hi,

In all cases, rtabmap will always retrieve nodes around the best loop closure hypotheses, independently of the current position of the robot in the map. This is useful in case the robot is lost (may not know it) and globally re-localize. This is done here.

When we use rtabmap planning capabilities as an intermediate to move_base, it will know which nodes in the global map to follow to reach the goal. If the nodes on that path are in LTM, they will be retrieved back to WM as the robot follows the planned path (i.e., series of nodes to reach the goal). This is done here.

If we didn't reach the number maximum local nodes retrieved (RGBD/MaxLocalRetrieved), we also look for the closest nodes. This is done here.

The last two  cases seem do to already something similar to what you said: "close to the current position and navigation path". We can adjust how many nodes at each update could be retrieved around the current position of the robot, by default it is 2.
rtabmap --params | grep Retrieved

Param: Rtabmap/MaxRetrieved = "2"                          [Maximum nodes retrieved at the same time from LTM.]
Param: RGBD/MaxLocalRetrieved = "2"                        [Maximum local locations retrieved (0=disabled) near the current pose in the local map or on the current planned path (those on the planned path have priority).]

cheers,
Mathieu