Gate yawConsistency on pose initialization to fix cold-start vision rejection#182
Open
nlaverdure wants to merge 4 commits intomainfrom
Open
Gate yawConsistency on pose initialization to fix cold-start vision rejection#182nlaverdure wants to merge 4 commits intomainfrom
nlaverdure wants to merge 4 commits intomainfrom
Conversation
FMS connection does not initialize the robot pose; only the auto routine does. Update comment to reflect this. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n count Rename poseInitialized → poseAsserted throughout (Drive, Vision, Robot). Add visionAcceptedCount: yawConsistency now activates when either poseAsserted is true (set by auto) OR visionAcceptedCount reaches yawConsistencyMinAccepted (default 10), whichever comes first. This allows vision to self-bootstrap without an auto routine in practice/teleop-only scenarios. Log analysis of VACHE Q54 confirms 10 accepts arrive in ~1.9s once observations are in range. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Closes #181
Summary
poseInitialized→poseAssertedinDrive,Vision,Robotfor clarityVisiontakesBooleanSupplier poseAssertedSupplier+Supplier<Rotation2d> headingSupplier; heading is passed toscoreObservationasnulluntil activation, causingyawConsistencyto skipyawConsistency:poseAsserted = true— set by auto routine viaDrive.setPose()visionAcceptedCount >= yawConsistencyMinAccepted(default 10) — vision self-bootstraps without an auto routine (teleop-only matches, practice)Log validation (VACHE Q54)
Analysis of
akit_26-03-22_14-57-55_vache_q54.wpilog:tagDistanceTolerance = 4.0 m. Zero observations pass.visionAcceptedCountstays at 0. TheposeAssertedpath (auto) remains the primary activation mechanism for competition starting positions.poseAsserted = true): First accepted pose at t=151.16 s (1.16 s into auto). 10th accepted pose at t=151.93 s (~1.9 s into auto). Scores uniformly 0.65–1.00, all aboveminScore = 0.65. Pose trajectory smooth — no jumps or outliers.yawConsistencyMinAccepted = 10is well-chosen. Accepts arrive dense (~5–8/s once in range) and the pose is stable by the 10th accepted observation. The threshold would be reached in ~2 s in any scenario where observations pass the distance/ambiguity filters.Test plan
yawConsistencystill rejects ambiguous PnP solutions after pose is activatedRobotPosesAcceptedis non-empty during auto (poseAsserted path)🤖 Generated with Claude Code