Skip to content

Add dashboard variable to track camera tag detection percentage#68

Open
quipp wants to merge 6 commits intodevfrom
feature/display-vision-percentage
Open

Add dashboard variable to track camera tag detection percentage#68
quipp wants to merge 6 commits intodevfrom
feature/display-vision-percentage

Conversation

@quipp
Copy link
Copy Markdown
Contributor

@quipp quipp commented Apr 11, 2026

No description provided.

@quipp quipp added enhancement New feature or request Untested This codes has not been tested, apart from a build. labels Apr 11, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Cameras and compute a running detection percentage.
  • Publish each camera’s detection percentage to SmartDashboard.
  • Reset stats on autonomousInit() and teleopInit() via DriveSubsystemPhotonVisionOdometry.

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.

Copilot AI review requested due to automatic review settings April 11, 2026 15:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 11, 2026 16:03
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Untested This codes has not been tested, apart from a build.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants