Class PoseUtil

java.lang.Object
frc.robot.util.PoseUtil

public class PoseUtil extends Object
Utility classes for working with poses.
  • Constructor Details

    • PoseUtil

      public PoseUtil()
  • Method Details

    • flipPoseX

      public static Pose2d flipPoseX(Pose2d pose)
      Flips a pose to the other alliance (inverts the X axis).
      Parameters:
      pose - Pose to flip.
      Returns:
      Flipped pose.
    • flipPoseX

      public static Pose3d flipPoseX(Pose3d pose)
      Flips a pose to the other alliance (inverts the X axis).
      Parameters:
      pose - Pose to flip.
      Returns:
      Flipped pose.
    • flipPoseY

      public static Pose2d flipPoseY(Pose2d pose)
      Flips a pose top/bottom on the field (inverts the Y axis).
      Parameters:
      pose - Pose to flip.
      Returns:
      Flipped pose.
    • flipPoseY

      public static Pose3d flipPoseY(Pose3d pose)
      Flips a pose top/bottom on the field (inverts the Y axis).
      Parameters:
      pose - Pose to flip.
      Returns:
      Flipped pose.
    • flipTranslationX

      public static Translation2d flipTranslationX(Translation2d translation)
      Flips a translation to the other alliance (inverts the X axis).
      Parameters:
      translation - Translation to flip.
      Returns:
      Flipped translation.
    • flipTranslationX

      public static Translation3d flipTranslationX(Translation3d translation)
      Flips a translation to the other alliance (inverts the X axis).
      Parameters:
      translation - Translation to flip.
      Returns:
      Flipped translation.
    • flipTranslationY

      public static Translation2d flipTranslationY(Translation2d translation)
      Flips a translaton top/bottom on the field (inverts the Y axis).
      Parameters:
      translation - Translation to flip.
      Returns:
      Flipped translation.
    • flipTranslationY

      public static Translation3d flipTranslationY(Translation3d translation)
      Flips a translaton top/bottom on the field (inverts the Y axis).
      Parameters:
      translation - Translation to flip.
      Returns:
      Flipped translation.
    • flipTransformY

      public static Transform2d flipTransformY(Transform2d transform)
      Flips a transform to the other alliance (inverts the X axis).
      Parameters:
      transform - Transform to flip.
      Returns:
      Flipped transform.
    • flipTransformY

      public static Transform3d flipTransformY(Transform3d transform)
      Flips a transform to the other alliance (inverts the X axis).
      Parameters:
      transform - Transform to flip.
      Returns:
      Flipped transform.