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 Pose2d
flipPoseAlliance
(Pose2d pose) Flips a pose to the other alliance.static Transform2d
flipTransformY
(Transform2d transform) Flips a transform across the X axis (inverts the Y axis).static Translation2d
flipTranslationAlliance
(Translation2d translation) Flips a translation to the other alliance.
-
Constructor Details
-
PoseUtil
public PoseUtil()
-
-
Method Details
-
flipPoseAlliance
Flips a pose to the other alliance.- Parameters:
pose
- Pose to flip.- Returns:
- Flipped pose.
-
flipTranslationAlliance
Flips a translation to the other alliance.- Parameters:
translation
- Translation to flip.- Returns:
- Flipped translation.
-
flipTransformY
Flips a transform across the X axis (inverts the Y axis).- Parameters:
transform
- Transform to flip.- Returns:
- Flipped transform.
-