MM is enabled with Rtabmap/TimeThr or Rtabmap/MemoryThr
Mem/ReduceGraph is enabled
The camera/robot always revisiting the past locations with loop closures detected (so that Link::kNeighborMerged are replacing Link::kNeighbor when exiting STM to WM)
Without Mem/ReduceGraph, the maximum nodes immunized at this step would be Bayes/PredictionLC size x 2 (or 34 nodes with default value), then maximum immunized nodes would be 34 or RGBD/LocalImmunizationRatio (of whatever WM size is). However, when there are Link::kNeighborMerged links, that number can be higher because of this condition where indirectly loop closures are not ignored:
https://github.com/introlab/rtabmap/blob/11a8057246f1bd52db5488e7725505c01ebfa477/corelib/src/Memory.cpp#L1544-L1573
Removing iter->second.type() == Link::kNeighborMerged there could be a solution though I am currently not entirely sure if it would work as expected in all cases. For example, assuming we have the graph state as below and we want to retrieve around Node 42 (blue links are Link::kNeighbor type and orange links are Link::kNeighborMerged type). If we remove that condition, it means we won't be able to immunize all red nodes (that are all actual neighbors of 42) because they are indirectly linked by a Link::kNeighborMerged link, but we want them immunized so that Bayes filter continues to retrieve appropriate nodes from LTM (and to correctly estimate loop closure hypotheses).
With that figure, we can also see the current issue where neighbors of node 18 (including 3 and its neighbors) would be also immunized following the current condition. The question is how do we immunize red nodes without immunizing neighbors of 18 and below?
MM -> Memory Management
Conditions:
Rtabmap/TimeThr
orRtabmap/MemoryThr
Mem/ReduceGraph
is enabledLink::kNeighborMerged
are replacingLink::kNeighbor
when exiting STM to WM)Following these conditions, all nodes in the map get immunized following this code because they could all fall under
Bayes/PredictionLC
size: https://github.com/introlab/rtabmap/blob/11a8057246f1bd52db5488e7725505c01ebfa477/corelib/src/Rtabmap.cpp#L2261-L2265Without
Mem/ReduceGraph
, the maximum nodes immunized at this step would beBayes/PredictionLC
size x 2 (or 34 nodes with default value), then maximum immunized nodes would be 34 orRGBD/LocalImmunizationRatio
(of whatever WM size is). However, when there areLink::kNeighborMerged
links, that number can be higher because of this condition where indirectly loop closures are not ignored: https://github.com/introlab/rtabmap/blob/11a8057246f1bd52db5488e7725505c01ebfa477/corelib/src/Memory.cpp#L1544-L1573Removing
iter->second.type() == Link::kNeighborMerged
there could be a solution though I am currently not entirely sure if it would work as expected in all cases. For example, assuming we have the graph state as below and we want to retrieve around Node 42 (blue links areLink::kNeighbor
type and orange links areLink::kNeighborMerged
type). If we remove that condition, it means we won't be able to immunize all red nodes (that are all actual neighbors of 42) because they are indirectly linked by aLink::kNeighborMerged
link, but we want them immunized so that Bayes filter continues to retrieve appropriate nodes from LTM (and to correctly estimate loop closure hypotheses).With that figure, we can also see the current issue where neighbors of node 18 (including 3 and its neighbors) would be also immunized following the current condition. The question is how do we immunize red nodes without immunizing neighbors of 18 and below?