-
Notifications
You must be signed in to change notification settings - Fork 2
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
Automatic Align Player Station #107
base: main
Are you sure you want to change the base?
Conversation
…tion override for the player station april tags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will finish my review of the command tomorrow but just wanted to leave these comments now while im thinking about it
src/main/java/frc/robot/commands/vision/PlayerStationAutoAlign.java
Outdated
Show resolved
Hide resolved
src/main/java/frc/robot/commands/vision/PlayerStationAutoAlign.java
Outdated
Show resolved
Hide resolved
src/main/java/frc/robot/commands/vision/PlayerStationAutoAlign.java
Outdated
Show resolved
Hide resolved
src/main/java/frc/robot/commands/vision/PlayerStationAutoAlign.java
Outdated
Show resolved
Hide resolved
…so update the robot's position, and changed command conditional from toggleOnTrue to onTrue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jagernet-ops Did you want us to try and test this out today if we get an opportunity?
…rc1675-2023 into PlayerStationAutoAlign
src/main/java/frc/robot/commands/vision/PlayerStationAutoAlign.java
Outdated
Show resolved
Hide resolved
@KaixWilliams and I tested this and made some fixes in the latest commit. We also had a key finding that our resetPose method was only working properly for 0 degree angles. So we had to adjust to using a different navx method to return the gyro angle. Testing it a little bit more at a future meeting would make sense before merging this into main, but it’s very close!! |
Great to hear! I'm excited to hopefully finish up this by next Monday! Enjoy spring break! |
Issue: #88
This asked me to create a command which takes the robot's current position and cross references it with preset locations across the field to determine the robot's orientation. The encompassing code circles around a toggle-able command that will take in the robot's current position on the grid and cross reference with a Pose2d object in the Constants file. This Pose2d object contains the boundary x and y positions as well as it's complementary angle (180 for Red and 0 for Blue). The command is set to toggle upon the Driver hitting up on the DPad. There also are overrides in the command. These overrides call the getTargetID() method in the Vision subsystem to also lock the robot's position.