Closed willtoth closed 6 months ago
Describe the bug When running on a robot, with the target to the left of center in the frame (so robot is turned clockwise w.r.t. the target), PhotonTrackedTarget::getYaw returns negative. However in simulation it returns positive yaw in degrees.
PhotonTrackedTarget::getYaw
This forces using code like this:
if (Robot.isSimulation()) { rotation = Rotation2d.fromDegrees(target.getYaw()); } else { rotation = Rotation2d.fromDegrees(-target.getYaw()); }
Describe the bug When running on a robot, with the target to the left of center in the frame (so robot is turned clockwise w.r.t. the target),
PhotonTrackedTarget::getYaw
returns negative. However in simulation it returns positive yaw in degrees.This forces using code like this: