2022 FRC Team 1515 Robot Code
- Setup buttons in Control
- Configure IDs in RobotMap
- Set steering offsets in RobotMap (follow instructions below)
Action | Button |
---|---|
Drive | Left stick |
Turn | Right stick |
Vertical Climber Up | RB |
Vertical Climber Down | RT |
Diagonal Climber Up | Y |
Diagonal Climber Down | X |
Manual Left Climber | B |
Manual Right Climber | A |
Manual Control Vertical | Left DPAD |
Manual Control Diagonal | Right DPAD |
Manual Control Expand | Up DPAD |
Manual Control Retract | Down DPAD |
Drive robot oriented | LB |
Slow robot down | LT |
Reset gyro | Back |
Align robot with target | Start |
Action | Button |
---|---|
Shoot | X |
Intake | RB |
Outtake | LB |
Mag up | A |
Mag down | B |
Reset shooter speed | RT |
Before setting up module offsets ensure each offset is set to
-Math.toRadians(0.0)
and that code is deployed to the robot. This must be done each time offsets are determined.
- Either turn the robot on its side or put it up on a cart with the wheels exposed.
By default, module sensor information is displayed in the
Drivetrain
tab on ShuffleBoard.
- Rotate each module so the bevel gear on the sides of each wheel are pointing to the robot's left.
When aligning the wheels they must be as straight as possible. It is recommended to use a long straight edge such as a piece of 2x1 in order to make the wheels straight.
-
Record the angles of each module using the reading displayed on the dashboard.
-
Set the values of the
*_MODULE_STEER_OFFSET
constants inConstants
to-Math.toRadians(<the angle you recorded>)
-
Re-deploy and try to drive the robot forwards. All wheels should stay parallel to each other.
-
Make sure all the wheels are spinning in the correct direction. If not, add 180 degrees to the offset of each wheel that is spinning in the incorrect direction. (I.e.
-Math.toRadians(<angle> + 180.0))
)