Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[apriltag] Fix FieldDimensions argument order #4659

Merged
Show file tree
Hide file tree
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
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
}
}