Hi, we have been making a code that basically works with only one apriltag, but when testing it on the speaker it detects both and it doesn’t allow us to do what we want, so we want to filter only one, how can this be done using photonvision?
You need to be more specific.
You said “It doesn’t do what we want.”
What did you want it to do? What did it do? What have you tried? What didn’t work?
In addition to the points mentioned above can you share your code via GitHub so we can see what else is going on as well?
Take a look at getFiducialID()
and using that to control an if statement.
What we are going to do is get the list of AprilTags detected and then loop through the list use the getFiducialID() for each target until we find the one that we want. Not sure that is the best way, but that is what we are going to try.
// Get a list of currently tracked targets.
List<PhotonTrackedTarget> targets = result.getTargets();
I had this issue earlier. Try this.
I was trying to take the distance of an apriltag and converting it to an specific action, but while doing this PhotonVision detects both apriltags and It kind of bugs a little.
Sorry right know I had been having trouble uploading code via github, but when I have the opportunity I will share it :>
Thank you, I will give it a try
Okay okay, I would also give it a try, thank you very much
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.