feat(relocalization): add mode-switched tracking for cheap re-localiz… - #3278
Open
nanibah wants to merge 1 commit into
Open
feat(relocalization): add mode-switched tracking for cheap re-localiz…#3278nanibah wants to merge 1 commit into
nanibah wants to merge 1 commit into
Conversation
…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.
nanibah
requested review from
leshy,
paul-nechifor and
spomichter
as code owners
July 29, 2026 21:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RelocalizationModulere-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.eval.py) that validates relocalization accuracy against a recording's own PGO-corrected trajectory, rather than trusting self-reported ICP fitness — pluscompare.sh/plot_comparison.pyto automate a before/after comparison.Results
go2_hongkong_office), with per-tracking-attempt latency dropping from 13-20s to ~0.05-0.1s.dimos/mapping/relocalization/README.md.Limitations
MAX_TRACKING_MISSESandSANITY_CHECK_INTERVALhaven't actually been exercised by any eval run so far — untested, not proven safe.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.shfor an automated before/after comparison + plots