AGHSEagleRobotics / frc1388-2024

0 stars 0 forks source link

Reset robot position and angle when a button is pressed #46

Open calvinxp opened 7 months ago

calvinxp commented 7 months ago

Notes

Pressing and holding the user button on the roboRIO for 2 seconds resets the encoders on the swerve modules. Resetting the gyro angle as requested in this issue will most likely be achieved by clicking a separate button on the robot.

Overview

At the beginning of the match, the robot needs to know where it is and which direction it is pointing. Pressing the user button will reset the gyro heading. The selection of an auto routine will be used to determine the robots initial location of the field.

To-Do

See also

jtechau commented 6 months ago

Updated the description to reflect that a separate button will be added to the robot to reset the heading. This button will be connected to a DIO. This is being done to make it easier for the drive team to reset the heading without using the User button, which is hard to reach and also will corrupt the swerve module calibration if held too long.

calvinxp commented 6 months ago

(item 1 done) Blue button is used to reset gyro angle to 180, because the robot usual is facing backwards during normal use on the field.

jtechau commented 6 months ago

Do we want to use the auto chooser to set the starting orientation, or just always make it fixed to the alliance wall orientation?

If we use the auto chooser, there's a complication that the robot orientation cannot be set until the robot is connected to the driver station AND the auto chooser has been set appropriately. It seems much simpler for setting up on the field if the setup crew doesn't have to coordinate this with the person setting up the laptop, and have to wait for the robot to be connected to the network.