Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 1 | include "frc971/control_loops/control_loops.fbs"; |
| 2 | |
| 3 | namespace y2017.control_loops.superstructure; |
| 4 | |
| 5 | table IntakeGoal { |
| 6 | // Zero for the intake is when the front tube is tangent with the front of the |
| 7 | // frame. Positive is out. |
| 8 | |
| 9 | // Goal distance of the intake. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 10 | distance:double (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 11 | |
| 12 | // Caps on velocity/acceleration for profiling. 0 for the default. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 13 | profile_params:frc971.ProfileParameters (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 14 | |
| 15 | // Voltage to send to the rollers. Positive is sucking in. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 16 | voltage_rollers:double (id: 2); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 17 | |
| 18 | // If true, disable the intake so we can hang. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 19 | disable_intake:bool (id: 3); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 20 | |
| 21 | // The gear servo value. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 22 | gear_servo:double (id: 4); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | table IndexerGoal { |
| 26 | // Indexer angular velocity goals in radians/second. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 27 | angular_velocity:double (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 28 | |
| 29 | // Roller voltage. Positive is sucking in. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 30 | voltage_rollers:double (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 31 | } |
| 32 | |
| 33 | table TurretGoal { |
| 34 | // An angle of zero means the turrent faces toward the front of the |
| 35 | // robot where the intake is located. The angle increases when the turret |
| 36 | // turns clockwise (towards right from the front), and decreases when |
| 37 | // the turrent turns counter-clockwise (towards left from the front). |
| 38 | // These are from a top view above the robot. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 39 | angle:double (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 40 | |
| 41 | // If true, ignore the angle and track using vision. If we don't see |
| 42 | // anything, we'll use the turret goal above. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 43 | track:bool (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 44 | |
| 45 | // Caps on velocity/acceleration for profiling. 0 for the default. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 46 | profile_params:frc971.ProfileParameters (id: 2); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | table HoodGoal { |
| 50 | // Angle the hood is currently at. An angle of zero is at the lower hard |
| 51 | // stop, angle increases as hood rises. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 52 | angle:double (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 53 | |
| 54 | // Caps on velocity/acceleration for profiling. 0 for the default. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 55 | profile_params:frc971.ProfileParameters (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 56 | } |
| 57 | |
| 58 | table ShooterGoal { |
| 59 | // Angular velocity goals in radians/second. Positive is shooting out of the |
| 60 | // robot. |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 61 | angular_velocity:double (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 62 | } |
| 63 | |
| 64 | table Goal { |
Austin Schuh | d7851b0 | 2020-11-14 13:46:27 -0800 | [diff] [blame^] | 65 | intake:IntakeGoal (id: 0); |
| 66 | indexer:IndexerGoal (id: 1); |
| 67 | turret:TurretGoal (id: 2); |
| 68 | hood:HoodGoal (id: 3); |
| 69 | shooter:ShooterGoal (id: 4); |
| 70 | lights_on:bool (id: 5); |
| 71 | use_vision_for_shots:bool (id: 6); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | root_type Goal; |