From d09f84ea76932b37671afce0428a04b2a5877906 Mon Sep 17 00:00:00 2001 From: Sriman Achanta <68172138+srimanachanta@users.noreply.github.com> Date: Sat, 25 Nov 2023 13:56:03 -0500 Subject: [PATCH] oopsies --- .../org/photonvision/vision/pipeline/AprilTagPipeline.java | 4 ++-- .../java/org/photonvision/vision/pipeline/ArucoPipeline.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/AprilTagPipeline.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/AprilTagPipeline.java index 6f2a110824..be2ff6e9dc 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/AprilTagPipeline.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/AprilTagPipeline.java @@ -168,8 +168,8 @@ protected CVPipelineResult process(Frame frame, AprilTagPipelineSettings setting AprilTagPoseEstimate tagPoseEstimate = null; // Do single-tag estimation when "always enabled" or if a tag was not used for multitag if (settings.doSingleTargetAlways - || (multiTagResultOpt.isPresent() - && !multiTagResultOpt.get().fiducialIDsUsed.contains(detection.getId()))) { + || multiTagResultOpt.isEmpty() + || !multiTagResultOpt.get().fiducialIDsUsed.contains(detection.getId())) { var poseResult = singleTagPoseEstimatorPipe.run(detection); sumPipeNanosElapsed += poseResult.nanosElapsed; tagPoseEstimate = poseResult.output; diff --git a/photon-core/src/main/java/org/photonvision/vision/pipeline/ArucoPipeline.java b/photon-core/src/main/java/org/photonvision/vision/pipeline/ArucoPipeline.java index f3af2844cd..b6242fc5af 100644 --- a/photon-core/src/main/java/org/photonvision/vision/pipeline/ArucoPipeline.java +++ b/photon-core/src/main/java/org/photonvision/vision/pipeline/ArucoPipeline.java @@ -190,8 +190,8 @@ protected CVPipelineResult process(Frame frame, ArucoPipelineSettings settings) // Do single-tag estimation when "always enabled" or if a tag was not used for multitag if (settings.doSingleTargetAlways - || (multiTagResultOpt.isPresent() - && !multiTagResultOpt.get().fiducialIDsUsed.contains(detection.getId()))) { + || multiTagResultOpt.isEmpty() + || !multiTagResultOpt.get().fiducialIDsUsed.contains(detection.getId())) { var poseResult = singleTagPoseEstimatorPipe.run(detection); sumPipeNanosElapsed += poseResult.nanosElapsed; tagPoseEstimate = poseResult.output;