Skip to content

Commit 8f0cc0a

Browse files
authored
Revert "Warn when getBestCameraToTarget returns 0, 0, 0 (#1334)" (#1351)
This reverts commit 6ff7b3e. See #1351 for context
1 parent 0105df9 commit 8f0cc0a

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

photon-core/src/main/java/org/photonvision/vision/target/TrackedTarget.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
import edu.wpi.first.apriltag.AprilTagDetection;
2020
import edu.wpi.first.apriltag.AprilTagPoseEstimate;
2121
import edu.wpi.first.math.geometry.Transform3d;
22-
import edu.wpi.first.wpilibj.DriverStation;
2322
import java.util.ArrayList;
2423
import java.util.HashMap;
2524
import java.util.List;
@@ -365,9 +364,6 @@ public boolean hasSubContours() {
365364
}
366365

367366
public Transform3d getBestCameraToTarget3d() {
368-
if (m_bestCameraToTarget3d.equals(new Transform3d())) {
369-
DriverStation.reportWarning("3d mode is not enabled.", false);
370-
}
371367
return m_bestCameraToTarget3d;
372368
}
373369

photon-targeting/src/main/native/include/photon/targeting/PhotonTrackedTarget.h

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <utility>
2323
#include <vector>
2424

25-
#include <frc/Errors.h>
2625
#include <frc/geometry/Transform3d.h>
2726
#include <wpi/SmallVector.h>
2827

@@ -139,12 +138,7 @@ class PhotonTrackedTarget {
139138
* reprojection error is the ambiguity, which is between 0 and 1.
140139
* @return The pose of the target relative to the robot.
141140
*/
142-
frc::Transform3d GetBestCameraToTarget() const {
143-
if (bestCameraToTarget == frc::Transform3d()) {
144-
FRC_ReportError(frc::warn::Warning, "3d mode is not enabled");
145-
}
146-
return bestCameraToTarget;
147-
}
141+
frc::Transform3d GetBestCameraToTarget() const { return bestCameraToTarget; }
148142

149143
/**
150144
* Get the transform that maps camera space (X = forward, Y = left, Z = up) to

0 commit comments

Comments
 (0)