Package org.team1126.robot.util
Class FuelLocalization
java.lang.Object
org.team1126.robot.util.FuelLocalization
-
Method Summary
Modifier and TypeMethodDescriptionstatic edu.wpi.first.math.geometry.Pose2destimateOnCarpet(edu.wpi.first.math.geometry.Pose2d fieldToRobot, edu.wpi.first.math.geometry.Transform3d robotToCamera, double yawDeg, double pitchDeg) Estimates the field position of a target on the carpet (z=0) from camera yaw/pitch.
-
Method Details
-
estimateOnCarpet
public static edu.wpi.first.math.geometry.Pose2d estimateOnCarpet(edu.wpi.first.math.geometry.Pose2d fieldToRobot, edu.wpi.first.math.geometry.Transform3d robotToCamera, double yawDeg, double pitchDeg) Estimates the field position of a target on the carpet (z=0) from camera yaw/pitch. Assumptions: - fuel is on the carpet (z = 0) - robot pose is accurate enough - robotToCamera is measured correctly- Returns:
- field-relative Pose2d at the hit point, or null if geometry is invalid.
-