Package frc.rebuilt
Class FieldHelpers
java.lang.Object
frc.rebuilt.FieldHelpers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleflipAngle(double angle) static edu.wpi.first.math.geometry.Rotation2dflipAngle(edu.wpi.first.math.geometry.Rotation2d angle) static doubleflipAngleIfRed(double blue) static edu.wpi.first.math.geometry.Rotation2dflipAngleIfRed(edu.wpi.first.math.geometry.Rotation2d blue) static edu.wpi.first.math.geometry.Pose2dflipIfRed(edu.wpi.first.math.geometry.Pose2d red) static edu.wpi.first.math.geometry.Translation2dflipIfRed(edu.wpi.first.math.geometry.Translation2d blue) static edu.wpi.first.math.geometry.Translation3dflipIfRed(edu.wpi.first.math.geometry.Translation3d blue) static edu.wpi.first.math.geometry.Pose2dflipIfRedSide(edu.wpi.first.math.geometry.Pose2d red) static edu.wpi.first.math.geometry.Translation2dflipIfRedSide(edu.wpi.first.math.geometry.Translation2d red) static doubleflipX(double xCoordinate) static doubleflipXifRed(double xCoordinate) static doubleflipY(double yCoordinate) static doubleflipYifRed(double yCoordinate) static doublenormalizeAngle(double angle) Normalizes an angle to the range [-π, π).static booleanposeOutOfField(edu.wpi.first.math.geometry.Pose2d pose2D) static booleanposeOutOfField(edu.wpi.first.math.geometry.Pose3d pose3D)
-
Constructor Details
-
FieldHelpers
public FieldHelpers()
-
-
Method Details
-
flipAngle
public static double flipAngle(double angle) -
flipAngle
public static edu.wpi.first.math.geometry.Rotation2d flipAngle(edu.wpi.first.math.geometry.Rotation2d angle) -
flipAngleIfRed
public static double flipAngleIfRed(double blue) -
flipAngleIfRed
public static edu.wpi.first.math.geometry.Rotation2d flipAngleIfRed(edu.wpi.first.math.geometry.Rotation2d blue) -
flipIfRed
public static edu.wpi.first.math.geometry.Translation2d flipIfRed(edu.wpi.first.math.geometry.Translation2d blue) -
flipIfRed
public static edu.wpi.first.math.geometry.Translation3d flipIfRed(edu.wpi.first.math.geometry.Translation3d blue) -
flipIfRed
public static edu.wpi.first.math.geometry.Pose2d flipIfRed(edu.wpi.first.math.geometry.Pose2d red) -
flipIfRedSide
public static edu.wpi.first.math.geometry.Translation2d flipIfRedSide(edu.wpi.first.math.geometry.Translation2d red) -
flipIfRedSide
public static edu.wpi.first.math.geometry.Pose2d flipIfRedSide(edu.wpi.first.math.geometry.Pose2d red) -
flipX
public static double flipX(double xCoordinate) -
flipY
public static double flipY(double yCoordinate) -
flipXifRed
public static double flipXifRed(double xCoordinate) -
flipYifRed
public static double flipYifRed(double yCoordinate) -
normalizeAngle
public static double normalizeAngle(double angle) Normalizes an angle to the range [-π, π).- Parameters:
angle- The angle in radians.- Returns:
- The normalized angle.
-
poseOutOfField
public static boolean poseOutOfField(edu.wpi.first.math.geometry.Pose2d pose2D) -
poseOutOfField
public static boolean poseOutOfField(edu.wpi.first.math.geometry.Pose3d pose3D)
-