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-tp9886p9918.html

Hi,

can we load all nodes for graph optimization but don't load full vocabulary to save memory?
I see what you would want but it is not possible right now. Indeed the graph is kinda small in RAM, while loading all the visual features / vocabulary can require significant memory. Having the option to load the global graph but load only vocabulary matching the WM state is an interesting idea (then update/resize the vocabulary when nodes are brought back in WM). In localization mode in particular, we could have a very low memory footprint. I created an issue about that.

we work with nav2 for navigation. is it possible load (to WM) all nodes that are close to the path provided by nav2 planner or load nodes within specific radius assuming graph optimization is done upon init ?
When rtabmap is restarted, it will load at least nodes to last known position of the robot. If the robot is starting somewhere else that is not in its working memory, it won't be able to correctly assemble the map around the current location without being localized first in a node in WM.

Note also that I don't have an example of memory management enabled with nav2 stack (as I had with nav for ros1). To make rtabmap correctly loads appropriate nodes to WM based on nav2 planning (while following a path like int this paper), we should use "goal" topic input of rtabmap to send goal indirectly to nav2. Some code have been ported to ros2, but I think I never tested with memory management enabled.