Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 1 | include "frc971/control_loops/profiled_subsystem.fbs"; |
| 2 | |
| 3 | namespace y2020.control_loops.superstructure; |
| 4 | |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 5 | table ShooterGoal { |
| 6 | // Angular velocity in rad/s of the slowest (lowest) wheel in the kicker. |
| 7 | // Positive is shooting the ball. |
| 8 | velocity_kicker:double; |
| 9 | |
| 10 | // Angular velocity in rad/s of the flywheel. Positive is shooting. |
| 11 | velocity_flywheel:double; |
| 12 | } |
| 13 | |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 14 | table Goal { |
Sabina Davis | 70d5e91 | 2020-01-31 21:10:37 -0800 | [diff] [blame] | 15 | // Zero is at the horizontal, positive towards the front (meters on the lead screw). |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 16 | // Only applies if hood_tracking = false. |
Sabina Davis | 70d5e91 | 2020-01-31 21:10:37 -0800 | [diff] [blame] | 17 | hood:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal; |
Sabina Davis | 6b61de3 | 2020-02-02 12:42:51 -0800 | [diff] [blame] | 18 | |
| 19 | //0 = Linkage on sprocket is pointing straight up |
| 20 | //Positive = forward |
| 21 | intake:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal; |
Tyler Chatow | 1879acc | 2020-02-01 13:26:48 -0800 | [diff] [blame] | 22 | |
Sabina Davis | 6b61de3 | 2020-02-02 12:42:51 -0800 | [diff] [blame] | 23 | //Positive is rollers intaking to Washing Machine. |
| 24 | roller_voltage:float; |
Tyler Chatow | 1879acc | 2020-02-01 13:26:48 -0800 | [diff] [blame] | 25 | |
| 26 | // 0 = facing the front of the robot. Positive rotates counterclockwise. |
| 27 | // TODO(Kai): Define which wrap of the shooter is 0 if it can rotate past |
| 28 | // forward more than once. |
| 29 | turret:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal; |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 30 | |
| 31 | // Only applies if shooter_tracking = false. |
| 32 | shooter:ShooterGoal; |
| 33 | |
| 34 | // Whether the robot should be shooting balls. Waits until hood, turret, and |
| 35 | // shooter are at goal (as determined by auto-tracking or override). |
| 36 | shooting:bool; |
| 37 | |
| 38 | // Whether the hood should adjust its position automatically. |
| 39 | hood_tracking:bool; |
| 40 | |
| 41 | // Whether the turret should follow the target automatically. |
| 42 | turret_tracking:bool; |
| 43 | |
| 44 | // Whether the kicker and flywheel should choose a velocity automatically. |
| 45 | shooter_tracking:bool; |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 46 | } |
| 47 | |
| 48 | root_type Goal; |