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. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame] | 8 | velocity_accelerator:double (id: 0); |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 9 | |
| 10 | // Angular velocity in rad/s of the flywheel. Positive is shooting. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame] | 11 | velocity_finisher:double (id: 1); |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 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. |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 17 | hood:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 0); |
Sabina Davis | 6b61de3 | 2020-02-02 12:42:51 -0800 | [diff] [blame] | 18 | |
Sabina Davis | 5187f86 | 2020-02-09 13:16:51 -0800 | [diff] [blame] | 19 | // Positive = counterclockwise from above; rotates Wheel of Fortune clockwise |
| 20 | // Zero is relative to start. |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 21 | control_panel:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 1); |
Sabina Davis | 5187f86 | 2020-02-09 13:16:51 -0800 | [diff] [blame] | 22 | |
Sabina Davis | 6737b09 | 2020-02-17 12:59:32 -0800 | [diff] [blame] | 23 | // 0 = Linkage on sprocket is pointing straight up |
| 24 | // Positive = forward |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 25 | intake:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 2); |
Tyler Chatow | 1879acc | 2020-02-01 13:26:48 -0800 | [diff] [blame] | 26 | |
John Park | 0a245a0 | 2020-02-02 14:10:15 -0800 | [diff] [blame] | 27 | // Positive is rollers intaking to Washing Machine. |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 28 | roller_voltage:float (id: 3); |
| 29 | |
| 30 | // Factor to multiply robot velocity by and add to roller voltage. |
| 31 | roller_speed_compensation:float (id: 11); |
Tyler Chatow | 1879acc | 2020-02-01 13:26:48 -0800 | [diff] [blame] | 32 | |
Austin Schuh | 2fb2364 | 2020-02-29 15:10:51 -0800 | [diff] [blame] | 33 | // 0 = facing the back of the robot. Positive rotates counterclockwise. |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 34 | turret:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 4); |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 35 | |
| 36 | // Only applies if shooter_tracking = false. |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 37 | shooter:ShooterGoal (id: 5); |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 38 | |
| 39 | // Whether the robot should be shooting balls. Waits until hood, turret, and |
| 40 | // shooter are at goal (as determined by auto-tracking or override). |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 41 | shooting:bool (id: 6); |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 42 | |
| 43 | // Whether the hood should adjust its position automatically. |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 44 | hood_tracking:bool (id: 7); |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 45 | |
| 46 | // Whether the turret should follow the target automatically. |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 47 | turret_tracking:bool (id: 8); |
Tyler Chatow | cf41366 | 2020-02-09 14:36:36 -0800 | [diff] [blame] | 48 | |
| 49 | // Whether the kicker and flywheel should choose a velocity automatically. |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 50 | shooter_tracking:bool (id: 9); |
Sabina Davis | 6737b09 | 2020-02-17 12:59:32 -0800 | [diff] [blame] | 51 | |
Ravago Jones | f8b7bfe | 2021-10-09 16:25:29 -0700 | [diff] [blame] | 52 | // Whether to serialize a ball under the accelerator tower |
| 53 | // so it is ready to shoot. |
| 54 | intake_preloading:bool (id: 12); |
| 55 | |
Sabina Davis | 6737b09 | 2020-02-17 12:59:32 -0800 | [diff] [blame] | 56 | // Positive is deploying climber and to climb; cannot run in reverse |
milind upadhyay | aec1aee | 2020-10-13 13:44:33 -0700 | [diff] [blame] | 57 | climber_voltage:float (id: 10); |
Austin Schuh | b187ddb | 2021-11-13 16:16:16 -0800 | [diff] [blame^] | 58 | |
| 59 | // Feed voltage override. |
| 60 | feed_voltage_override:float (id: 13); |
Stephan Massalt | d021f97 | 2020-01-05 20:41:23 -0800 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | root_type Goal; |