Skip to content

Separate driver heading from pose estimation; fix auto pose init#179

Merged
nlaverdure merged 4 commits intomainfrom
drive-heading-pose-reset
Mar 26, 2026
Merged

Separate driver heading from pose estimation; fix auto pose init#179
nlaverdure merged 4 commits intomainfrom
drive-heading-pose-reset

Conversation

@nlaverdure
Copy link
Copy Markdown
Member

@nlaverdure nlaverdure commented Mar 26, 2026

Summary

  • Separates driver "forward" from pose estimation: The headingOffset concept is removed from Drive. Driver-relative heading is now purely a UI concern managed by DriveCommands.driverForwardDirection, while drive.getPose().getRotation() is the single source of truth for field-relative heading.
  • Fixes auto pose initialization: Drive.setPose() now properly resets the pose estimator (was previously only resetting the heading offset), and sets a poseInitialized flag so getFieldRelativeHeading() returns null until the pose has field-relative meaning — preventing false vision yaw rejections at startup.
  • Removes Drive.getHeading() / resetHeading(): All callers now use drive.getPose().getRotation() (field-relative) or drive.getRawGyroRotation() (characterization) as appropriate. Vision heading supplier updated from getRawGyroRotation to getFieldRelativeHeading.

Test plan

  • Confirm field-relative drive works correctly after driver presses "reset forward"
  • Confirm auto pose initialization sets pose correctly (robot faces expected direction at auto start)
  • Confirm vision yaw consistency check does not false-reject at startup
  • Confirm wheel radius characterization still functions correctly

🤖 Generated with Claude Code

@nlaverdure nlaverdure merged commit 0917b3c into main Mar 26, 2026
2 checks passed
@nlaverdure nlaverdure deleted the drive-heading-pose-reset branch March 26, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants