Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions utilities/flippable/FlippablePose2d.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down