Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Field Length Increased #506

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Field Length Increased #506

wants to merge 3 commits into from

Conversation

kujo27
Copy link
Contributor

@kujo27 kujo27 commented Jan 22, 2025

Why are we doing this?

Fixes Pose2d conversions from Blue Alliance to Red Alliance

Whats changing?

BasePoseSubsystem fieldXMidpointInMeters

Questions/notes for reviewers

How this was tested

  • unit tests added
  • tested on robot

@kujo27 kujo27 requested a review from a team as a code owner January 22, 2025 17:04
@kujo27 kujo27 changed the title field is longer than last years Field Length Increased Jan 22, 2025
Copy link
Contributor

@aschokking aschokking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

@@ -46,14 +46,14 @@ public abstract class BasePoseSubsystem extends BaseSubsystem implements DataFra
protected BooleanProperty rioRotated;
protected boolean firstUpdate = true;
protected double lastSetHeadingTime;
public static double fieldXMidpointInMeters = 8.2705;
public static double fieldXMidpointInMeters = 8.7785;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⭐ while we're here, consider turning this into a Distance value of Meters.of instead

Suggested change
public static double fieldXMidpointInMeters = 8.7785;
public static Distance fieldXMidpoint = Meters.of(8.7785);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should also add a comment about what years field this is for? Maybe have a list of past lengths in case someone was running 2024?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did we get this new value from? The field is relatively evergreen, so this one surprises me a little.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Game Manual specified the field length as approximately 26ft. 5in. by 57ft. 6(7/8)in. I took the length and converted it to meters then halved it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you verify this using AdvantageScope? If you drive the robot to 8.7785, is it exactly in the middle of the field?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I verified it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants