-
Notifications
You must be signed in to change notification settings - Fork 9
New way to do standard deviations #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@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 |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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
|
/gemini review |
There was a problem hiding this 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.
the way a lot of other teams do it (might be work trying)