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

Incorrect Java Example - Enabling MultiTag #1632

Open
tom131313 opened this issue Dec 12, 2024 · 0 comments
Open

Incorrect Java Example - Enabling MultiTag #1632

tom131313 opened this issue Dec 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tom131313
Copy link

The example code at:
https://docs.photonvision.org/en/v2025.0.0-beta-4/docs/apriltag-pipelines/multitag.html
Enabling MultiTag

if (result.getMultiTagResult().estimatedPose.isPresent) {
  Transform3d fieldToCamera = result.getMultiTagResult().estimatedPose.best;
}

I think should be

if (result.getMultiTagResult().isPresent()) {
  Transform3d fieldToCamera = result.getMultiTagResult().get().estimatedPose.best;
}

Also, in multiple places including in this example

var result = camera.getLatestResult();

should not use deprecated method and needs to extract the result from the recommended list (crude example - need to check for empty and multiple entries)

var results = camera.getAllUnreadResults(); 
var result = results.get(0);

Also, the home page https://docs.photonvision.org/en/v2025.0.0-beta-4/index.html refers to an archived repository for Contact Us to report issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant