Package frc.rebuilt

Class FieldHelpers

java.lang.Object
frc.rebuilt.FieldHelpers

public class FieldHelpers extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    flipAngle(double angle)
     
    static edu.wpi.first.math.geometry.Rotation2d
    flipAngle(edu.wpi.first.math.geometry.Rotation2d angle)
     
    static double
    flipAngleIfRed(double blue)
     
    static edu.wpi.first.math.geometry.Rotation2d
    flipAngleIfRed(edu.wpi.first.math.geometry.Rotation2d blue)
     
    static edu.wpi.first.math.geometry.Pose2d
    flipIfRed(edu.wpi.first.math.geometry.Pose2d red)
     
    static edu.wpi.first.math.geometry.Translation2d
    flipIfRed(edu.wpi.first.math.geometry.Translation2d blue)
     
    static edu.wpi.first.math.geometry.Translation3d
    flipIfRed(edu.wpi.first.math.geometry.Translation3d blue)
     
    static edu.wpi.first.math.geometry.Pose2d
    flipIfRedSide(edu.wpi.first.math.geometry.Pose2d red)
     
    static edu.wpi.first.math.geometry.Translation2d
    flipIfRedSide(edu.wpi.first.math.geometry.Translation2d red)
     
    static double
    flipX(double xCoordinate)
     
    static double
    flipXifRed(double xCoordinate)
     
    static double
    flipY(double yCoordinate)
     
    static double
    flipYifRed(double yCoordinate)
     
    static double
    normalizeAngle(double angle)
    Normalizes an angle to the range [-π, π).
    static boolean
    poseOutOfField(edu.wpi.first.math.geometry.Pose2d pose2D)
     
    static boolean
    poseOutOfField(edu.wpi.first.math.geometry.Pose3d pose3D)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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)