Skip to content

reset drivetrain to average of first new vision readings#145

Merged
amzoeee merged 6 commits into
mainfrom
tori/vision-bump-drivetrain-reset
Apr 7, 2026
Merged

reset drivetrain to average of first new vision readings#145
amzoeee merged 6 commits into
mainfrom
tori/vision-bump-drivetrain-reset

Conversation

@tortillini-tokki

Copy link
Copy Markdown
Contributor

No description provided.

@amzoeee amzoeee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm; i think we should test before running in a match though.

Comment thread src/main/java/frc/robot/RobotContainer.java Outdated
@augmentcode

augmentcode Bot commented Apr 6, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: Adds a post-bump odometry recovery path by hard-resetting drivetrain pose from the first valid vision updates.

Changes:

  • On bump detection, clears camera history and sets a flag to reset pose on the next valid vision reading.
  • In updatePoseEst(), when the flag is set, computes an averaged XY translation from available camera readings and calls m_drivetrain.resetPose, skipping normal vision fusion for that cycle.
  • Adds VisionSubsystem.getAverageTranslation(...) to average translation across multiple camera pose estimates.

Technical Notes: The reset uses vision for translation while retaining the drivetrain/gyro-based heading.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread src/main/java/frc/robot/RobotContainer.java Outdated
Comment thread src/main/java/frc/robot/RobotContainer.java
Comment thread src/main/java/frc/robot/subsystems/vision/VisionSubsystem.java
@amzoeee amzoeee merged commit bac9b38 into main Apr 7, 2026
1 check passed
@amzoeee amzoeee deleted the tori/vision-bump-drivetrain-reset branch April 7, 2026 01:11
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