Skip to content

feat(relocalization): add mode-switched tracking for cheap re-localiz… - #3278

Open
nanibah wants to merge 1 commit into
dimensionalOS:mainfrom
nanibah:feature/relocalization-tracking-mode
Open

feat(relocalization): add mode-switched tracking for cheap re-localiz…#3278
nanibah wants to merge 1 commit into
dimensionalOS:mainfrom
nanibah:feature/relocalization-tracking-mode

Conversation

@nanibah

@nanibah nanibah commented Jul 29, 2026

Copy link
Copy Markdown

Summary

  • RelocalizationModule re-runs the full FPFH+RANSAC+ICP global search every cycle, measured at 13-70s wall-clock against a nominal 2-second re-localization budget — it can't keep up with its own throttle interval.
  • Adds a cheap "tracking" mode: once a recent lock exists, reuse it as a seed for local ICP instead of re-running the full search, falling back to the untouched global search whenever that seed can no longer be trusted.
  • Adds a ground-truth benchmark harness (eval.py) that validates relocalization accuracy against a recording's own PGO-corrected trajectory, rather than trusting self-reported ICP fitness — plus compare.sh/plot_comparison.py to automate a before/after comparison.

Results

  • ~50-65% reduction in total wall-clock time on the test recording (go2_hongkong_office), with per-tracking-attempt latency dropping from 13-20s to ~0.05-0.1s.
  • Tracking-mode accuracy lands within a modest, bounded margin of the fresh-search baseline (tens of mm translation, well under a degree of yaw).
  • Full numbers, plots, and reproduction steps: see dimos/mapping/relocalization/README.md.

Limitations

  • The residual accuracy gap looks structural (the live map's own shape evolving across a session via column-carving) rather than something tracking-mode-specific — reset-cadence tuning doesn't meaningfully close it.
  • MAX_TRACKING_MISSES and SANITY_CHECK_INTERVAL haven't actually been exercised by any eval run so far — untested, not proven safe.
  • See README.md's "Known limitations" and "Scope of improvement" sections for the full list, including why a live factor-graph approach and a LIO-SAM-style integration were deliberately not pursued.

Test plan

  • uv run python -m dimos.mapping.relocalization.eval go2_hongkong_office --map-file go2_hongkong_office_twopass_map --mode global (baseline)
  • uv run python -m dimos.mapping.relocalization.eval go2_hongkong_office --map-file go2_hongkong_office_twopass_map --mode tracking (this feature)
  • ./dimos/mapping/relocalization/compare.sh for an automated before/after comparison + plots

…ation

RelocalizationModule re-ran the full FPFH+RANSAC+ICP global search on
every cycle (measured 13-70s wall-clock against a nominal 2s budget).
Adds a cheap "tracking" mode that reuses the last good alignment as an
ICP seed once a recent lock exists, falling back to the untouched
global search whenever that seed can no longer be trusted.

Also adds a ground-truth benchmark harness (eval.py) that validates
relocalization accuracy against a recording's own PGO-corrected
trajectory instead of trusting self-reported ICP fitness, plus
compare.sh/plot_comparison.py to automate a before/after comparison,
and results/ with the run logs + plots backing the numbers in the
README's writeup.

See README.md in this directory for the full design writeup, results,
and known limitations.

AI disclosure: built with Claude Code (Sonnet 5) -- I directed the
design decisions, caught and diagnosed regression failures during
development, made the final calls on tuning parameters, and can walk
through any part of the implementation.
@github-actions github-actions Bot added the first-time-contributor PR opened by an author who had not previously committed to this repository label Jul 29, 2026
@rui-dimos rui-dimos assigned rui-dimos and aclauer and unassigned rui-dimos Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first-time-contributor PR opened by an author who had not previously committed to this repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants