Skip to content
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

Only Calculate Estimated Poses When Multiple Tags are Present with PhotonVision? #141

Closed
gcschmit opened this issue Dec 27, 2024 · 1 comment
Labels
question Further information is requested

Comments

@gcschmit
Copy link
Contributor

Describe the question you have.
For the PhotonVision specific implementation, is it intentional that the vision example project only considers pose observations when multiple tags are present?

Describe the reason for your confusion.
PhotonVision can provide pose estimates based on a single tag, as well as multiple tags.

Is your question related to a problem? Please describe.
While pose estimates based on multiple tags are usually more accurate, depending on the layout of tags on the field, this implementation may not provide pose estimates as often as it otherwise could. This could potential lead to frustration for teams who may not realize that the implementation only provides estimates when multiple tags are present.

Additional context
Regardless of the answer to this question, when multiple tags are present, the ambiguity will always be reported as 0, which may negatively impact the standard deviation calculation. For multiple-tags, an alternative is to use reprojection error as a measure of quality.

@gcschmit gcschmit added the question Further information is requested label Dec 27, 2024
@jwbonner
Copy link
Member

This is just an oversight, since I didn't realize that PhotonVision's multitagResult is not provided at all for single tags. 6328's vision system is designed to always provide field-to-camera transforms to the robot code regardless of the number of tags, and I just forgot to check that assumption. The commit I just pushed adds support for single tags, though it's unfortunately a bit more complex to implement in robot code since PhotonVision only provides the raw camera-to-tag transform. Definitely better than the alternative though.

With regard to multitag results having an ambiguity of zero, that's expected since including multiple tags solves the ambiguity issue (which is specific to square targets). Ambiguity is only used for filtering out results with high ambiguity, so setting it to zero just disables that particular filter. The standard deviations are based on the number of tags and average distance, so they will be unaffected.

@jwbonner jwbonner closed this as completed Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants