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

Vision distance #51

Merged
merged 14 commits into from
Dec 4, 2024
Merged

Vision distance #51

merged 14 commits into from
Dec 4, 2024

Conversation

linglejack06
Copy link
Member

@linglejack06 linglejack06 commented Nov 26, 2024

Summary: add distance based variance and tag based variance according to photon pose estimation GitHub

  • remove filter photon pose method as it is now replaced by a variance with max values
  • add a 2025 method that can be commented out and replace current way of finding new results when wpilib is upgraded

Variances:

  • single tags have a standard deviance and multiple tags have another variance with lower values
  • deviations are then multiplied by the average distance squared divided by 30 (this is what photon had, teams use different options throughout)
  • if distance is greater than 4 AND only one tag then variances are filled with max value (rejected)

Resolves #55
Resolves #41

@linglejack06 linglejack06 self-assigned this Nov 26, 2024
@aidnem
Copy link
Contributor

aidnem commented Nov 27, 2024

@linglejack06 could you drive it around in sim a little bit and screen record to demonstrate it? Also that would verify if this mitigates the awful pose estimates while turning problem.

Copy link
Member

@jkleiber jkleiber left a comment

Choose a reason for hiding this comment

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

first pass feedback + concur with @aidnem that I'd like to see this drive in sim (we might need to tune some of the standard deviations a bit)

@linglejack06
Copy link
Member Author

first pass feedback + concur with @aidnem that I'd like to see this drive in sim (we might need to tune some of the standard deviations a bit)

@jkleiber @aidnem ill try to test out in sim as soon as jitpack decides to work

@linglejack06
Copy link
Member Author

also copied from above, im unsure why specifically x^2 / 30 is added for distance, but i assume it makes it an easy way to adjust the denominator depending on how much we trust farther measurements

@jkleiber
Copy link
Member

@linglejack06 you could rebase onto/cherry pick my maven branch if you want to use maven local rather than Jitpack

I'm debating just getting that merged and then coming back for the maven central version

@linglejack06
Copy link
Member Author

Screen.Recording.2024-12-02.at.6.39.37.PM.mov

@linglejack06
Copy link
Member Author

no more drifting, looks great in sim. ready for review @jkleiber @aidnem

@linglejack06
Copy link
Member Author

also turning in middle of field is fxed with no loss of pose

@linglejack06 linglejack06 requested a review from jkleiber December 3, 2024 00:33
Copy link
Member

@jkleiber jkleiber left a comment

Choose a reason for hiding this comment

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

Verification LGTM, Approved

@linglejack06
Copy link
Member Author

@aidenm can you review this, its waiting on you?

@aidnem
Copy link
Contributor

aidnem commented Dec 4, 2024

@linglejack06 sure, I thought it was stuck because of the weird review dismissing behavior.

@aidnem
Copy link
Contributor

aidnem commented Dec 4, 2024

@linglejack06 It's now stuck because spotless is causing build to fail, you could try the solution I linked under #59 . I haven't tried it so I'm not sure if it will work but it's worth a shot.

@linglejack06
Copy link
Member Author

@aidenm i went ahead and just added back the build constants until we decide how to fix it definitively

@aidnem aidnem self-requested a review December 4, 2024 17:40
@linglejack06 linglejack06 merged commit b23b2d3 into main Dec 4, 2024
6 checks passed
@linglejack06 linglejack06 deleted the vision-distance branch December 4, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants