Fixed some issues related to intermediate nodes and retrieval/immunization (#1733)

* Allow ignoring intermediate nodes when calculating WM size

* Fix the retrieval logic to avoid unnecessary code execution

* Making getWorkingMemSize(true) complexity O(1)

* Updated statistics to show STM size, WM size, immunized nodes without intermediate nodes count. Added two new statistics to track number of intermediate nodes in STM and WM.

* Correct the condition for counting intermediate nodes

* Restore the logic of retrieval 2/3 to avoid affecting updateAge

---------

Co-authored-by: matlabbe <matlabbe@gmail.com>
This commit is contained in:
Borong Yuan
2026-07-15 01:14:11 +08:00
committed by GitHub
parent d96c30710e
commit 0f56dd4b43
5 changed files with 161 additions and 62 deletions

View File

@@ -204,7 +204,7 @@ rtabmap::ParametersMap RTABMapApp::getRtabmapParameters()
uInsert(parameters, rtabmap::ParametersPair(rtabmap::Parameters::kRtabmapMaxRetrieved(), "0")); // deactivate global retrieval
uInsert(parameters, rtabmap::ParametersPair(rtabmap::Parameters::kRGBDMaxLocalRetrieved(), "0")); // deactivate local retrieval
uInsert(parameters, rtabmap::ParametersPair(rtabmap::Parameters::kMemMapLabelsAdded(), "false")); // don't create map labels
uInsert(parameters, rtabmap::ParametersPair(rtabmap::Parameters::kRtabmapMemoryThr(), "2")); // keep the WM empty
uInsert(parameters, rtabmap::ParametersPair(rtabmap::Parameters::kRtabmapMemoryThr(), "1")); // keep the WM empty
uInsert(parameters, rtabmap::ParametersPair(rtabmap::Parameters::kMemSTMSize(), "1")); // STM=1 -->
uInsert(parameters, rtabmap::ParametersPair(rtabmap::Parameters::kRGBDProximityBySpace(), "false"));
uInsert(parameters, rtabmap::ParametersPair(rtabmap::Parameters::kRGBDLinearUpdate(), "0"));