Skip to content

made mt1 std dev a bit better - #238

Open
koolpoolo wants to merge 29 commits into
mainfrom
mt1-improvements
Open

made mt1 std dev a bit better#238
koolpoolo wants to merge 29 commits into
mainfrom
mt1-improvements

Conversation

@koolpoolo

Copy link
Copy Markdown
Contributor

No description provided.

@koolpoolo

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the vision subsystem's pose estimation by introducing an angular baseline calculation for MT1 solves, replacing the previous harmonic distance sum model. It also adds several constants for handling odometry resets during defensive play and implements a shared reset cooldown. A review comment identifies a telemetry issue where the "angularBaselineRad" key in SmartDashboard is shared across all cameras, leading to data overwrites in NetworkTables.

Comment thread src/main/java/frc/robot/subsystems/VisionSubsystem.java

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the vision subsystem by introducing an angular baseline calculation to improve standard deviation estimation for MT1 solves, replacing the previous harmonic sum approach. It also adds defense-specific reset thresholds and a shared cooldown for translation resets to prevent thrashing. The review feedback focuses on improving the robustness of the new computeAngularBaseline method by addressing a potential null pointer exception and ensuring that diagnostic logging to the dashboard is camera-specific to prevent data overwriting in multi-camera configurations.

Comment thread src/main/java/frc/robot/subsystems/VisionSubsystem.java
Comment thread src/main/java/frc/robot/subsystems/VisionSubsystem.java Outdated
@koolpoolo
koolpoolo marked this pull request as ready for review April 21, 2026 07:13
@koolpoolo

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request enhances the vision subsystem by introducing a more robust standard deviation model for MegaTag1 (MT1) based on angular baseline and adding a "defense reset" mechanism. The defense reset allows for hard-snapping odometry to high-confidence vision readings when significant disagreement is detected under defense contact. A shared cooldown was implemented to prevent reset thrashing. Feedback focuses on potential telemetry overwriting, the accuracy of the angular baseline calculation relative to camera offsets, and the priority of MegaTag2 resets over MT1 within the cooldown window.

Comment thread src/main/java/frc/robot/subsystems/VisionSubsystem.java Outdated
Comment thread src/main/java/frc/robot/subsystems/VisionSubsystem.java Outdated
Comment thread src/main/java/frc/robot/subsystems/VisionSubsystem.java Outdated
Comment thread src/main/java/frc/robot/subsystems/VisionSubsystem.java
Comment thread src/main/java/frc/robot/subsystems/VisionSubsystem.java Outdated
@koolpoolo

Copy link
Copy Markdown
Contributor Author

NOTE: don't merge until worlds branch is merged

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.

5 participants