From 2a5e89fa97136967cca89b058bfee2cd16483865 Mon Sep 17 00:00:00 2001 From: bovlb <31326650+bovlb@users.noreply.github.com> Date: Tue, 13 Dec 2022 22:27:43 -0800 Subject: [PATCH] [apriltag] Improve description of pose coordinates (NFC) (#4810) The "bottom-left" language appears to be based on [a 2-D diagram on another page](https://docs.wpilib.org/en/stable/docs/software/advanced-controls/geometry/coordinate-systems.html) and doesn't seem very helpful here. --- .../edu/wpi/first/apriltag/AprilTagFieldLayout.java | 9 ++++----- .../native/include/frc/apriltag/AprilTagFieldLayout.h | 11 ++++------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java b/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java index 145411507d..6921b0b75c 100644 --- a/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java +++ b/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java @@ -33,11 +33,10 @@ import java.util.Optional; * meters with "width" and "length" values. This is to account for arbitrary field sizes when * transforming the poses. * - *

Pose3ds are assumed to be measured from the bottom-left corner of the field, when the blue - * alliance is at the left. By default, Pose3ds will be returned as declared when calling {@link - * AprilTagFieldLayout#getTagPose(int)}. {@link #setOrigin(OriginPosition)} can be used to transform - * the poses returned from {@link AprilTagFieldLayout#getTagPose(int)} to be correct relative to a - * different coordinate frame. + *

Pose3ds in the JSON are measured using the normal FRC coordinate system, NWU with the origin + * at the bottom-right corner of the blue alliance wall. {@link #setOrigin(OriginPosition)} can be + * used to change the poses returned from {@link AprilTagFieldLayout#getTagPose(int)} to be from the + * perspective of a specific alliance. */ @JsonIgnoreProperties(ignoreUnknown = true) @JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE) diff --git a/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h b/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h index 8f1c296a01..c69e4291af 100644 --- a/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h +++ b/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h @@ -31,13 +31,10 @@ namespace frc { * "width" and "length" values. This is to account for arbitrary field sizes * when transforming the poses. * - * Pose3ds are assumed to be measured from the bottom-left corner of the field, - * when the blue alliance is at the left. By default, Pose3ds will be returned - * as declared when calling GetTagPose(int). - * SetOrigin(AprilTagFieldLayout::OriginPosition) can be used to transform the - * poses returned by GetTagPose(int) to be correct relative to a different - * coordinate frame. - */ + * Pose3ds in the JSON are measured using the normal FRC coordinate system, NWU + * with the origin at the bottom-right corner of the blue alliance wall. + * SetOrigin(OriginPosition) can be used to change the poses returned from + * GetTagPose(int) to be from the perspective of a specific alliance. */ class WPILIB_DLLEXPORT AprilTagFieldLayout { public: enum class OriginPosition {