[apriltag] Fix FieldDimensions argument order (#4659)

This commit is contained in:
Tyler Veness
2022-11-17 22:15:55 -08:00
committed by GitHub
parent c203f3f0a9
commit 13aceea8dc
2 changed files with 10 additions and 10 deletions

View File

@@ -129,7 +129,7 @@ public class AprilTagFieldLayout {
case kRedAllianceWallRightSide:
setOrigin(
new Pose3d(
new Translation3d(m_fieldDimensions.fieldWidth, m_fieldDimensions.fieldLength, 0),
new Translation3d(m_fieldDimensions.fieldLength, m_fieldDimensions.fieldWidth, 0),
new Rotation3d(0, 0, Math.PI)));
break;
default:
@@ -217,20 +217,20 @@ public class AprilTagFieldLayout {
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonAutoDetect(getterVisibility = JsonAutoDetect.Visibility.NONE)
private static class FieldDimensions {
@SuppressWarnings("MemberName")
@JsonProperty(value = "width")
public double fieldWidth;
@SuppressWarnings("MemberName")
@JsonProperty(value = "length")
public double fieldLength;
@SuppressWarnings("MemberName")
@JsonProperty(value = "width")
public double fieldWidth;
@JsonCreator()
FieldDimensions(
@JsonProperty(required = true, value = "width") double fieldWidth,
@JsonProperty(required = true, value = "length") double fieldLength) {
this.fieldWidth = fieldWidth;
@JsonProperty(required = true, value = "length") double fieldLength,
@JsonProperty(required = true, value = "width") double fieldWidth) {
this.fieldLength = fieldLength;
this.fieldWidth = fieldWidth;
}
}
}

View File

@@ -409,7 +409,7 @@
}
} ],
"field" : {
"width" : 16.4592,
"length" : 8.2296
"length" : 8.2296,
"width" : 16.4592
}
}