blob: 3cf6945d91463220e3568356a35ab3bae33b7055 [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001include "frc971/control_loops/control_loops.fbs";
2
3namespace y2017.control_loops.superstructure;
4
5table 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 Schuhd7851b02020-11-14 13:46:27 -080010 distance:double (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -070011
12 // Caps on velocity/acceleration for profiling. 0 for the default.
Austin Schuhd7851b02020-11-14 13:46:27 -080013 profile_params:frc971.ProfileParameters (id: 1);
Alex Perrycb7da4b2019-08-28 19:35:56 -070014
15 // Voltage to send to the rollers. Positive is sucking in.
Austin Schuhd7851b02020-11-14 13:46:27 -080016 voltage_rollers:double (id: 2);
Alex Perrycb7da4b2019-08-28 19:35:56 -070017
18 // If true, disable the intake so we can hang.
Austin Schuhd7851b02020-11-14 13:46:27 -080019 disable_intake:bool (id: 3);
Alex Perrycb7da4b2019-08-28 19:35:56 -070020
21 // The gear servo value.
Austin Schuhd7851b02020-11-14 13:46:27 -080022 gear_servo:double (id: 4);
Alex Perrycb7da4b2019-08-28 19:35:56 -070023}
24
25table IndexerGoal {
26 // Indexer angular velocity goals in radians/second.
Austin Schuhd7851b02020-11-14 13:46:27 -080027 angular_velocity:double (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -070028
29 // Roller voltage. Positive is sucking in.
Austin Schuhd7851b02020-11-14 13:46:27 -080030 voltage_rollers:double (id: 1);
Alex Perrycb7da4b2019-08-28 19:35:56 -070031}
32
33table 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 Schuhd7851b02020-11-14 13:46:27 -080039 angle:double (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -070040
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 Schuhd7851b02020-11-14 13:46:27 -080043 track:bool (id: 1);
Alex Perrycb7da4b2019-08-28 19:35:56 -070044
45 // Caps on velocity/acceleration for profiling. 0 for the default.
Austin Schuhd7851b02020-11-14 13:46:27 -080046 profile_params:frc971.ProfileParameters (id: 2);
Alex Perrycb7da4b2019-08-28 19:35:56 -070047}
48
49table 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 Schuhd7851b02020-11-14 13:46:27 -080052 angle:double (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -070053
54 // Caps on velocity/acceleration for profiling. 0 for the default.
Austin Schuhd7851b02020-11-14 13:46:27 -080055 profile_params:frc971.ProfileParameters (id: 1);
Alex Perrycb7da4b2019-08-28 19:35:56 -070056}
57
58table ShooterGoal {
59 // Angular velocity goals in radians/second. Positive is shooting out of the
60 // robot.
Austin Schuhd7851b02020-11-14 13:46:27 -080061 angular_velocity:double (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -070062}
63
64table Goal {
Austin Schuhd7851b02020-11-14 13:46:27 -080065 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 Perrycb7da4b2019-08-28 19:35:56 -070072}
73
74root_type Goal;