[codex] Bound non-converged GICP fitness fallback#6
Open
FieldDiTian wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR tightens gicp_localization’s acceptance logic by bounding the existing “non-converged but low-fitness” fallback with correction-magnitude gates, reducing wrong-basin accepts that were preventing GT recovery from engaging. It also fixes a C++ initialization pattern (Eigen ternary) that was breaking builds.
Changes:
- Add parameters to cap acceptable non-converged corrections (
gicp/nonConvergedFitnessOkMaxTransM,gicp/nonConvergedFitnessOkMaxRotDeg) and incorporate them into the effective-convergence decision. - Publish the bounded effective-convergence decision to the debug
convergedtopic for consistent observability. - Replace an Eigen ternary initialization of
initial_guesswith a simpler/saferifassignment.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| gicp_localization/src/localization.cc | Implements bounded non-converged fallback, updates debug publishing, and fixes initial_guess initialization. |
| gicp_localization/include/gicp_localization/localization.h | Adds member fields for the new non-converged fallback bounds. |
| gicp_localization/cfg/localization.yaml | Documents and sets defaults for the new parameters. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
gicp/nonConvergedFitnessOkMaxTransMandgicp/nonConvergedFitnessOkMaxRotDegdefaults of3.0mand5.0deg.convergedtopic.initial_guessthat broke package builds.Root Cause
Run5-on-Run3 accepted some wrong-basin GICP results where raw GICP reported
converged=false, but absolute fitness was belowgicp/fitnessRejectThreshold. Those accepted frames reset the consecutive-failure counter, so GT recovery could not engage until after the pose had already drifted far from INS.The observed bad chain included low-fitness non-converged corrections such as about
3.27m / 11.2degand9.21m / 10.7deg. This PR keeps the intended max-iteration fallback only for small corrections and rejects larger non-converged candidates as failed convergence.Validation
git diff --checksource /opt/ros/jazzy/setup.bash && colcon build --packages-select gicp_localization --cmake-args -DCMAKE_BUILD_TYPE=ReleaseFull replay result after the patch:
5.564 / 12.702 / 17.969 mversus baseline run206.447 / 21.634 / 39.159 m.1145 -> 397.434 -> 78.99 -> 3.