-
Notifications
You must be signed in to change notification settings - Fork 206
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
Photonlibpy - Best Target Function #1223
Conversation
After testing, we have found that Photonvision does not have a particular sort for AprilTags. As such, it isn't clear why I would appreciate some input on the matter. Vlad |
Additionally, it isn't clear to us whether retroreflective tape is supported in this version of the program. If it isn't, is it possible to use sort by ambiguity to determine the best AprilTag. |
Yes, the concept of best target is largely not a thing for apriltags, as false-positives are eliminated by othe means, and multiple valid targets are often in sight at once. Even though true retro reflective is dead for FRC, there is still some relevance for colored shape or Neural Net pipelines ... Probably worth test and review this summer, as examples also need updated to be apriltag-first. |
Hey @drvladb FYI - Was doing some cleanup, realized this was still hanging. I'll take a look hopefully later this week again after the serde stuff settles out in python, and will propose a path forward. It's looking more and more like we won't be robotpy wrappering the C++ vendordep like we'd hoped, which means this PR is very relevant to keep API parity between the languages. |
Awesome! Vlad |
@@ -39,5 +39,10 @@ def getTimestamp(self) -> float: | |||
def getTargets(self) -> list[PhotonTrackedTarget]: | |||
return self.targets | |||
|
|||
def getBestTarget(self) -> PhotonTrackedTarget: |
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.
I might just add a doc string explaining how "best" is calculated, and then we should be good to ship it
A rather simple
getBestTarget()
function for a pipeline result.The idea to use
.get(0)
comes from the Java version of the library. This implies the assumption that target packets are sent in order.I do not have access to a robot at the moment (thus it's a draft), but this matches the behavior of the Java client, so I'm confident it should work.
Vlad & the 5113 software team.