-
Notifications
You must be signed in to change notification settings - Fork 0
Auto rotate #6
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
base: visionbase
Are you sure you want to change the base?
Auto rotate #6
Conversation
…n and being locked to that rotation
… rotates when you start driving since the pid is in the joystick drive control
…o the desired angle updates as the command is running
…the commands had the requirement of the drivetrain before, which was the problem
…, add a target point, and test
…lly update the desired angle from the method. might be because we only call face point once? but that doesn't really make sense
… the reefs and it gets the value from the driver station to know where to point. can still toggle it off. next step is to make it so there are many different possible target points and the code handles figuring out where to point based on the state of the robot
…isionbase to become part of the template
mccv
left a comment
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.
This looks great! Some minor comments, definitely take or leave.
| }, | ||
| drive)); | ||
|
|
||
| controller |
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.
is there a way to unset slow drive?
| } | ||
|
|
||
| Rotation2d currentDesiredAngle = getDesiredAngle(); | ||
| Logger.recordOutput( |
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.
love the logging
|
|
||
| private Pose2d targetPose = new Pose2d(); | ||
|
|
||
| private Rotation2d desiredAngle = null; |
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.
if you want, you can have everything be a supplier, and in the case where you have a fixed value, people just have to call it with setDesiredAngleSupplier(() -> 2.0) or whatever. That may simplify some code as you don't have to consider both cases.
| private Translation2d targetPoint = null; | ||
| private boolean slowDrive; | ||
|
|
||
| private static final Translation2d RED_TARGET_POINT = new Translation2d(13, 4.026); |
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 don't love having specific points in Drive.java, but don't really have suggestions for a cleaner place to put them right now. Feels like Drive should get passed a point to face (like, drive.setTargetPoint(RED_TARGET_POINT) and drive.clearTargetPoint() or something), but not sure if that clutters up other things.
No description provided.