Skip to content

Conversation

@koolpoolo
Copy link
Contributor

the way a lot of other teams do it (might be work trying)

@iamawesomecat
Copy link
Contributor

iamawesomecat commented Nov 13, 2025

@Jetblackdragon can we test this on thursday (11/13) or monday (11/17)?

DISTANCE_SC_STANDARD_DEVS.times(Math.max(0, Distance - 1)).plus(STANDARD_DEVS));
RawTimestampSeconds,

//// Use one of these, first one is current second is what advantage kit example is
Copy link
Member

Choose a reason for hiding this comment

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

Please do the math (Excel is good at this) to compare the two methods for various tag distances & see how that affects the values in the vector below. I'd expect this to also depend on the exact camera & lens plus the pipeline configuration (mostly resolution & shutter speed) since I believe those are the primary vision contributors to noise in the data. Robot movement (rotation especially) would also significantly affect noise, so it'd be interesting to see if using that to scale up the stdDev values helps (by decreasing confidence in position values read while the camera's field of view is rapidly changing).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah raising first value in angleStdDev variable would change that also i made the excel and the new method has higher centainty then normalizes at 1.5 meters https://bsd405-my.sharepoint.com/:x:/g/personal/s-petersonv_bsd405_org/EfjhAm5jN-5MhkD20tjVeOgBJP0OWWgkxK8w6pqWHvNhug?e=Xq4Xfp

@markpete
Copy link

/gemini review

Copy link

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

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 introduces a new method for calculating standard deviations for vision-based pose estimation, based on the average distance to all visible AprilTags. My review focuses on improving the robustness and readability of this new implementation.

I've identified a critical issue where the code could crash if it detects an AprilTag not present in the field layout, due to unsafe access to Optional values. I've provided suggestions to fix this for both the best target distance calculation and the new average distance calculation loop.

Additionally, I've made a few suggestions to improve code quality:

  • Replacing magic numbers with named constants to improve readability and tune-ability.
  • Removing commented-out code to keep the source clean.

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.

6 participants