Skip to content

Commit

Permalink
Revert "Warn when getBestCameraToTarget returns 0, 0, 0 (#1334)"
Browse files Browse the repository at this point in the history
This reverts commit 6ff7b3e.
  • Loading branch information
mcm001 authored Jun 18, 2024
1 parent 0105df9 commit 2763aef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import edu.wpi.first.apriltag.AprilTagDetection;
import edu.wpi.first.apriltag.AprilTagPoseEstimate;
import edu.wpi.first.math.geometry.Transform3d;
import edu.wpi.first.wpilibj.DriverStation;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -365,9 +364,6 @@ public boolean hasSubContours() {
}

public Transform3d getBestCameraToTarget3d() {
if (m_bestCameraToTarget3d.equals(new Transform3d())) {
DriverStation.reportWarning("3d mode is not enabled.", false);
}
return m_bestCameraToTarget3d;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <utility>
#include <vector>

#include <frc/Errors.h>
#include <frc/geometry/Transform3d.h>
#include <wpi/SmallVector.h>

Expand Down Expand Up @@ -139,12 +138,7 @@ class PhotonTrackedTarget {
* reprojection error is the ambiguity, which is between 0 and 1.
* @return The pose of the target relative to the robot.
*/
frc::Transform3d GetBestCameraToTarget() const {
if (bestCameraToTarget == frc::Transform3d()) {
FRC_ReportError(frc::warn::Warning, "3d mode is not enabled");
}
return bestCameraToTarget;
}
frc::Transform3d GetBestCameraToTarget() const { return bestCameraToTarget; }

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

0 comments on commit 2763aef

Please sign in to comment.