Skip to content

Commit

Permalink
[apriltag] Fix FieldDimensions argument order (#4659)
Browse files Browse the repository at this point in the history
  • Loading branch information
calcmogul authored Nov 18, 2022
1 parent c203f3f commit 13aceea
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void setOrigin(OriginPosition origin) {
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:
Expand Down Expand Up @@ -217,20 +217,20 @@ public int hashCode() {
@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;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
}
} ],
"field" : {
"width" : 16.4592,
"length" : 8.2296
"length" : 8.2296,
"width" : 16.4592
}
}

0 comments on commit 13aceea

Please # to comment.