Repository navigation
reloc: fiducial relocalization as a sibling of lidar - #3900
Closed
AaryanAgrawal wants to merge 5 commits into
Closed
AaryanAgrawal wants to merge 5 commits into
AaryanAgrawal wants to merge 5 commits into
Conversation
PGOConfig's odometry priors are tuned for a Go2-class ground robot and trust
relative z 100x tighter than xy - the comment in the config says so. The map
CLI constructed PGO() with no arguments, so there was no way past that short
of editing source, and on a stairs walk it is backwards: z is the axis a
lidar-inertial estimate drifts on worst, so loop closures that need to
correct height were being resisted.
--non-planar trusts z like xy. --pgo-set name=value overrides any PGOConfig
field for everything else (loop_search_radius is the next suspect on
switchback stairs), parsed against the field's own type so a typo is a CLI
error rather than a config that quietly means something else.
Measured on athens: the two maps differ by 4.3 cm median, 17 cm p90, 2.5 m
max, and the climb loses ~1 m of spurious height at the top. Ivan confirmed
the loosened one is the better map by eye.
data/mid360_athens_stairs.pc2.lcm is that map:
dimos map global mid360_athens_stairs --lidar pointlio_lidar \
--voxel 0.005 --export --denoise --non-planar
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## feat/ivan/relocalize2 #3900 +/- ##
=========================================================
+ Coverage 77.90% 77.95% +0.04%
=========================================================
Files 1335 1339 +4
Lines 127203 127538 +335
Branches 11170 11194 +24
=========================================================
+ Hits 99100 99418 +318
- Misses 25013 25020 +7
- Partials 3090 3100 +10
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
leshy
force-pushed
the
feat/ivan/relocalize2
branch
from
September 3, 2026 07:34
1d1cd54 to
d552f67
Compare
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.
Contribution path
Stacked on #3890 (
feat/ivan/relocalize2); base is that branch, not main.Problem
Lidar relocalization needs distinctive geometry, so a featureless corridor defeats it. A surveyed AprilTag in view gives a fix from one sighting with no geometry at all. The earlier fiducial work (#3162) predates the per-source relocalizer contract in #3890 and fed a shared judge that contract removes.
Solution
FiducialRelocalizationis a sibling ofLidarRelocalization: it subclasses the same base, declares its own input, owns its own accept decision, and callssubmit().Three decisions worth a look:
MarkerDetectionStreamModulegains anaggregated_detectionsoutput the wayRayTracingVoxelMappublishesglobal_map. The relocalizer only composesworld_T_marker @ inv(map_T_marker)and gates on the score.TagAggregator, in one file. It is the detector's tap: gate each glimpse, keep a per-tag window, fuse with Huber IRLS (weighted-mean translation, Markley quaternion mean), publish once per visit. Same logic as feat(relocalization): fiducial relocalization prior + pre-map marker aggregation #3162, rewritten rather than ported. Every knob inAggregationConfigcarries its unit and the reason for its value on the same line; the gate values are jnav's (gsc_pgo: online and offline PGO #2587) and are not re-tuned here.map_fileis optional and onlymarker_map_fileis needed. The loader lives in the relocalizer, the only thing that reads it.min_scoredefaults to 0 because the bar is unmeasured; the per-glimpse gates still apply upstream.Left out on purpose, each a separate change: the ambiguity-ratio gate, the marker-map size override, and the survey CLI. A marker map is a small JSON, so a hand-written one runs this today.
How to Test
Unit:
pytest dimos/mapping/relocalization/fiducial dimos/perception/fiducial.AI assistance
Claude Code with Fable 5.1 wrote the modules and tests from a design the operator set; the operator reviewed the diff and directed every design decision above.
Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01DgAoKBZuBdaxcXFmU4jiQi