Package frc.robot.util
Class PoseUtil
java.lang.Object
frc.robot.util.PoseUtil
Utility classes for working with poses.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Pose2dFlips a pose to the other alliance (inverts the X axis).static Pose3dFlips a pose to the other alliance (inverts the X axis).static Pose2dFlips a pose top/bottom on the field (inverts the Y axis).static Pose3dFlips a pose top/bottom on the field (inverts the Y axis).static Transform2dflipTransformY(Transform2d transform) Flips a transform to the other alliance (inverts the X axis).static Transform3dflipTransformY(Transform3d transform) Flips a transform to the other alliance (inverts the X axis).static Translation2dflipTranslationX(Translation2d translation) Flips a translation to the other alliance (inverts the X axis).static Translation3dflipTranslationX(Translation3d translation) Flips a translation to the other alliance (inverts the X axis).static Translation2dflipTranslationY(Translation2d translation) Flips a translaton top/bottom on the field (inverts the Y axis).static Translation3dflipTranslationY(Translation3d translation) Flips a translaton top/bottom on the field (inverts the Y axis).
-
Constructor Details
-
PoseUtil
public PoseUtil()
-
-
Method Details
-
flipPoseX
Flips a pose to the other alliance (inverts the X axis).- Parameters:
pose- Pose to flip.- Returns:
- Flipped pose.
-
flipPoseX
Flips a pose to the other alliance (inverts the X axis).- Parameters:
pose- Pose to flip.- Returns:
- Flipped pose.
-
flipPoseY
Flips a pose top/bottom on the field (inverts the Y axis).- Parameters:
pose- Pose to flip.- Returns:
- Flipped pose.
-
flipPoseY
Flips a pose top/bottom on the field (inverts the Y axis).- Parameters:
pose- Pose to flip.- Returns:
- Flipped pose.
-
flipTranslationX
Flips a translation to the other alliance (inverts the X axis).- Parameters:
translation- Translation to flip.- Returns:
- Flipped translation.
-
flipTranslationX
Flips a translation to the other alliance (inverts the X axis).- Parameters:
translation- Translation to flip.- Returns:
- Flipped translation.
-
flipTranslationY
Flips a translaton top/bottom on the field (inverts the Y axis).- Parameters:
translation- Translation to flip.- Returns:
- Flipped translation.
-
flipTranslationY
Flips a translaton top/bottom on the field (inverts the Y axis).- Parameters:
translation- Translation to flip.- Returns:
- Flipped translation.
-
flipTransformY
Flips a transform to the other alliance (inverts the X axis).- Parameters:
transform- Transform to flip.- Returns:
- Flipped transform.
-
flipTransformY
Flips a transform to the other alliance (inverts the X axis).- Parameters:
transform- Transform to flip.- Returns:
- Flipped transform.
-