Add dashboard variable to track camera tag detection percentage#68
Add dashboard variable to track camera tag detection percentage#68
Conversation
There was a problem hiding this comment.
Pull request overview
Adds per-camera telemetry for how often AprilTags are detected, and resets the stat at the start of each enabled period so the value reflects the current run.
Changes:
- Track total frames vs. frames-with-targets in
Camerasand compute a running detection percentage. - Publish each camera’s detection percentage to SmartDashboard.
- Reset stats on
autonomousInit()andteleopInit()viaDriveSubsystem→PhotonVisionOdometry.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/main/java/frc/robot/util/vision/Cameras.java |
Adds frame counters + computed tagDetectionPercentage updated when unread results are processed. |
src/main/java/frc/robot/subsystems/vision/PhotonVisionOdometry.java |
Publishes per-camera detection percentage to SmartDashboard; adds a helper to reset all camera stats. |
src/main/java/frc/robot/subsystems/DriveSubsystem.java |
Adds resetVisionStats() wrapper to reset all camera stats when vision odometry is enabled. |
src/main/java/frc/robot/Robot.java |
Calls resetVisionStats() at the start of auto and teleop. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/frc/robot/subsystems/vision/PhotonVisionOdometry.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/java/frc/robot/subsystems/vision/PhotonVisionOdometry.java
Outdated
Show resolved
Hide resolved
src/main/java/frc/robot/subsystems/vision/PhotonVisionOdometry.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.