milind-u | 086d726 | 2022-01-19 20:44:18 -0800 | [diff] [blame] | 1 | include "frc971/control_loops/profiled_subsystem.fbs"; |
| 2 | |
| 3 | namespace y2022.control_loops.superstructure; |
| 4 | |
Austin Schuh | 39f26f6 | 2022-02-24 21:34:46 -0800 | [diff] [blame^] | 5 | table CatapultGoal { |
| 6 | // If true, fire! The robot will only fire when ready. |
| 7 | fire:bool (id: 0); |
| 8 | |
| 9 | // The target shot position and velocity. If these are provided before fire |
| 10 | // is called, the optimizer can pre-compute the trajectory. |
| 11 | shot_position:double (id: 1); |
| 12 | shot_velocity:double (id: 2); |
| 13 | |
| 14 | // The target position to return the catapult to when not shooting. |
| 15 | return_position:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 3); |
| 16 | } |
| 17 | |
milind-u | 086d726 | 2022-01-19 20:44:18 -0800 | [diff] [blame] | 18 | table Goal { |
Siddhant Kanwar | 0e37f59 | 2022-02-21 19:26:50 -0800 | [diff] [blame] | 19 | // Height of the climber above rest point |
| 20 | climber:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 0); |
Henry Speiser | 55aa3ba | 2022-02-21 23:21:12 -0800 | [diff] [blame] | 21 | |
| 22 | // Goal angles of intake joints. |
| 23 | // Positive is out, 0 is up. |
| 24 | intake_front:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 1); |
| 25 | intake_back:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 2); |
| 26 | |
| 27 | // Positive is rollers intaking. |
| 28 | roller_speed_front:double (id: 3); |
| 29 | roller_speed_back:double (id: 4); |
| 30 | // One transfer motor for both sides |
| 31 | transfer_roller_speed:double (id: 5); |
| 32 | |
| 33 | // Factor to multiply robot velocity by and add to roller voltage. |
| 34 | roller_speed_compensation:double (id: 6); |
| 35 | |
| 36 | turret:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 7); |
Austin Schuh | 39f26f6 | 2022-02-24 21:34:46 -0800 | [diff] [blame^] | 37 | |
| 38 | // Catapult goal state. |
| 39 | catapult:CatapultGoal (id: 8); |
milind-u | 086d726 | 2022-01-19 20:44:18 -0800 | [diff] [blame] | 40 | } |
| 41 | |
| 42 | root_type Goal; |