From a4822c262bd7635dc03e92c872c70e582d437239 Mon Sep 17 00:00:00 2001 From: bovlb <31326650+bovlb@users.noreply.github.com> Date: Tue, 13 Dec 2022 14:53:24 -0800 Subject: [PATCH 1/8] Better description of pose co-ordinates 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. --- .../java/edu/wpi/first/apriltag/AprilTagFieldLayout.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 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 145411507dc..8a9036e9544 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 @@ * 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 co-ordinate 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 specifc alliance.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE)
From a2a311fe27472c5288ce8d22812549cb97c4ac29 Mon Sep 17 00:00:00 2001
From: bovlb <31326650+bovlb@users.noreply.github.com>
Date: Tue, 13 Dec 2022 14:55:33 -0800
Subject: [PATCH 2/8] Update
apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java
Co-authored-by: Ryan Blue Pose3ds in the JSON are measured using the normal FRC co-ordinate 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 specifc alliance.
+ * be from the perspective of a specific alliance.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE)
From c3e1a8ea54cfc64b5bb0c2fe36be58b2289d170d Mon Sep 17 00:00:00 2001
From: bovlb <31326650+bovlb@users.noreply.github.com>
Date: Tue, 13 Dec 2022 15:22:35 -0800
Subject: [PATCH 3/8] Same thing on C++ side
---
.../native/include/frc/apriltag/AprilTagFieldLayout.h | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h b/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
index 8f1c296a01e..099e551fdf8 100644
--- a/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
+++ b/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
@@ -31,12 +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 co-ordinate 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:
From 7f7f07e9e315d48e928f484e8951e0c1ef356a23 Mon Sep 17 00:00:00 2001
From: bovlb <31326650+bovlb@users.noreply.github.com>
Date: Tue, 13 Dec 2022 16:15:06 -0800
Subject: [PATCH 4/8] Keep linter happy. Use American spelling
---
.../native/include/frc/apriltag/AprilTagFieldLayout.h | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h b/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
index 099e551fdf8..92b57938341 100644
--- a/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
+++ b/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
@@ -31,11 +31,10 @@ namespace frc {
* "width" and "length" values. This is to account for arbitrary field sizes
* when transforming the poses.
*
- * Pose3ds in the JSON are measured using the normal FRC co-ordinate 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.
- */
++ * 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 {
From e9dca93d6de1d04dd3d08e45d74ffbb6c5be90ef Mon Sep 17 00:00:00 2001
From: bovlb <31326650+bovlb@users.noreply.github.com>
Date: Tue, 13 Dec 2022 16:15:50 -0800
Subject: [PATCH 5/8] Use American spelling
---
.../main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 17fe645dc1a..d6370e1a7d8 100644
--- a/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java
+++ b/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java
@@ -33,7 +33,7 @@
* meters with "width" and "length" values. This is to account for arbitrary field sizes when
* transforming the poses.
*
- * Pose3ds in the JSON are measured using the normal FRC co-ordinate system, NWU with the
+ * 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.
From 445b0d10c58adc1c8f7ed43ad3a32c5142c8fc7f Mon Sep 17 00:00:00 2001
From: bovlb <31326650+bovlb@users.noreply.github.com>
Date: Tue, 13 Dec 2022 16:21:26 -0800
Subject: [PATCH 6/8] Doh. Don't trust linter output
---
.../native/include/frc/apriltag/AprilTagFieldLayout.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h b/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
index 92b57938341..fdb7d671cb0 100644
--- a/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
+++ b/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
@@ -31,10 +31,10 @@ namespace frc {
* "width" and "length" values. This is to account for arbitrary field sizes
* when transforming the poses.
*
-+ * 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. */
+ * 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 {
From 13968fde3a58bcd5ecaf57ce8ad9c912c9099515 Mon Sep 17 00:00:00 2001
From: bovlb <31326650+bovlb@users.noreply.github.com>
Date: Tue, 13 Dec 2022 16:27:55 -0800
Subject: [PATCH 7/8] Keep linter happy by removing space at end of line
---
.../src/main/native/include/frc/apriltag/AprilTagFieldLayout.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h b/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
index fdb7d671cb0..c69e4291afa 100644
--- a/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
+++ b/apriltag/src/main/native/include/frc/apriltag/AprilTagFieldLayout.h
@@ -31,7 +31,7 @@ namespace frc {
* "width" and "length" values. This is to account for arbitrary field sizes
* when transforming the poses.
*
- * Pose3ds in the JSON are measured using the normal FRC coordinate system, NWU
+ * 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. */
From 5c4c84f18fc7abd5751b0617432c28ba65cd5e57 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Wed, 14 Dec 2022 00:34:10 +0000
Subject: [PATCH 8/8] Formatting fixes
---
.../java/edu/wpi/first/apriltag/AprilTagFieldLayout.java | 8 ++++----
1 file changed, 4 insertions(+), 4 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 d6370e1a7d8..6921b0b75c8 100644
--- a/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java
+++ b/apriltag/src/main/java/edu/wpi/first/apriltag/AprilTagFieldLayout.java
@@ -33,10 +33,10 @@
* meters with "width" and "length" values. This is to account for arbitrary field sizes when
* transforming the poses.
*
- * 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.
+ * 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)