Skip to content

Commit

Permalink
Add mitigation for OOB apriltags
Browse files Browse the repository at this point in the history
  • Loading branch information
superpenguin612 committed Mar 23, 2024
1 parent 3ab489d commit dec007b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ public Optional<EstimatedRobotPose> getEstimatedGlobalPose(
estimatedRobotPose = photonEstimatedRobotPose.get().estimatedPose;
detectedAprilTags = getPosesFromTargets(result.targets, estimatedRobotPose,
robotToCam);

if (estimatedRobotPose.getZ() > 1 || estimatedRobotPose.getZ() < -1) {
return Optional.empty();
}
} else {
detectedAprilTags = new Pose3d[0];
estimatedRobotPose = new Pose3d(-100, -100, -100, new Rotation3d());
Expand Down

0 comments on commit dec007b

Please sign in to comment.