Skip to content

Support intermediate nodes with memory management enabled - #1687

Merged
matlabbe merged 8 commits into
masterfrom
intermediate_nodes_with_mm
Apr 19, 2026
Merged

matlabbe merged 8 commits into
masterfrom
intermediate_nodes_with_mm

Conversation

@matlabbe

@matlabbe matlabbe commented Apr 13, 2026 •

Copy link
Copy Markdown
Member

Related to #1685

These fixes should make the memory management works seemlessly when Rtabmap/CreateIntermediateNodes is true. The only difference is that Rtabmap/MemoryThr should be scaled accordingly if used with intermediate nodes. For example, if the input data frequency is 10 Hz and Rtabmap/DetectionRate is 1, we would have to set 10x Rtabmap/MemoryThr. If Rtabmap/TimeThr is used instead, nothing has to be modified. Note that there would be a slight overhead on Retrieval and Transfer when intermediate nodes are enabled.

EDIT: Had to change how Kp/BadSignRatio works. It will be a ratio of Kp/MaxFeatures by default if max features is not 0, otherwise will use old approach of averaging words on all signatures in working memory. Note that with Rtabmap/CreateIntermediateNodes on, the average will be a lot lower than usual, the ratio may need to be tuned if so.

EDIT 2: Added abort error log when RTAB-Map's planning with Rtabmap/CreateIntermediateNodes enabled. Not supported.

Tested using this demo: https://github.com/introlab/rtabmap_ros/blob/ros2/rtabmap_demos/launch/multisession_mapping_demo.launch.py
with:

'Rtabmap/CreateIntermediateNodes': 'true',
'Rtabmap/MemoryThr': '3500'

EDIT: With #1733, no need to scale Rtabmap/MemoryThr anymore.

@matlabbe
matlabbe marked this pull request as ready for review April 19, 2026 22:59
@matlabbe
matlabbe merged commit 9cbe84e into master Apr 19, 2026
9 checks passed
@matlabbe
matlabbe deleted the intermediate_nodes_with_mm branch April 19, 2026 23:08
huichangs added a commit to huichangs/rtabmap that referenced this pull request Apr 21, 2026
Rebuild segment branch on top of upstream/master (0.23.5) which added
"Support intermediate nodes with memory management" (PR introlab#1687). Resolves
the version mismatch where rtabmap_ros expects 0.23.5 but core was 0.23.4.

Conflict resolutions:
- Memory.cpp reactivateSignatures(): keep upstream's new recursive path
  that skips intermediate nodes from maxLoaded count — our fork never
  touched this function.
- Rtabmap.cpp path-immunization: take upstream's clean version
  (updateGoalIndex only). Our commented-out block had identical effect.
- Rtabmap.cpp zone-classification region: take our semantic-zone code;
  upstream's retrieval additions had no landing section in our file.
- Rtabmap.cpp TRANSFER: keep our zone-aware cleanup path but add
  upstream's !lastSignatureWasIntermediateNode guard.
huichangs added a commit to huichangs/rtabmap that referenced this pull request Apr 21, 2026
Why: upstream PR introlab#1687 added required bool arg to
getLastWorkingSignature(); totalTime decl was lost in merge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant