From 1a058398175c36b6aba72c10ae84f5b151468b4d Mon Sep 17 00:00:00 2001 From: Trigon5990 Date: Sun, 22 Feb 2026 21:25:54 +0200 Subject: [PATCH] Update FlippablePose2d.java Co-Authored-By: Nummun14 <142012009+Nummun14@users.noreply.github.com> --- utilities/flippable/FlippablePose2d.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/utilities/flippable/FlippablePose2d.java b/utilities/flippable/FlippablePose2d.java index 7c6f467d..9bff1a39 100644 --- a/utilities/flippable/FlippablePose2d.java +++ b/utilities/flippable/FlippablePose2d.java @@ -51,6 +51,15 @@ public FlippableRotation2d getRotation() { return new FlippableRotation2d(nonFlippedObject.getRotation(), shouldFlipWhenRedAlliance); } + /** + * Gets the translation value of the pose. The pose will be flipped if the robot is on the red alliance and {@link #shouldFlipWhenRedAlliance} is true. + * + * @return the translation value of the pose + */ + public FlippableTranslation2d getTranslation() { + return new FlippableTranslation2d(nonFlippedObject.getTranslation(), shouldFlipWhenRedAlliance); + } + @Override protected Pose2d flip(Pose2d pose) { return FlippingUtil.flipFieldPose(pose);