blob: 6266b3ccfdd709837f668fd7d7da1539d0ffb58d [file] [log] [blame]
milind-u086d7262022-01-19 20:44:18 -08001include "frc971/control_loops/profiled_subsystem.fbs";
2
3namespace y2022.control_loops.superstructure;
4
Austin Schuh39f26f62022-02-24 21:34:46 -08005table CatapultGoal {
Ravago Jones5da06352022-03-04 20:26:24 -08006 // Old fire flag, only kept for backwards-compatability with logs.
7 // Use the fire flag in the root Goal instead
8 fire:bool (id: 0, deprecated);
Austin Schuh39f26f62022-02-24 21:34:46 -08009
10 // The target shot position and velocity. If these are provided before fire
11 // is called, the optimizer can pre-compute the trajectory.
12 shot_position:double (id: 1);
13 shot_velocity:double (id: 2);
14
15 // The target position to return the catapult to when not shooting.
16 return_position:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 3);
17}
18
milind-u086d7262022-01-19 20:44:18 -080019table Goal {
Siddhant Kanwar0e37f592022-02-21 19:26:50 -080020 // Height of the climber above rest point
21 climber:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 0);
Henry Speiser55aa3ba2022-02-21 23:21:12 -080022
23 // Goal angles of intake joints.
24 // Positive is out, 0 is up.
25 intake_front:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 1);
26 intake_back:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 2);
27
28 // Positive is rollers intaking.
29 roller_speed_front:double (id: 3);
30 roller_speed_back:double (id: 4);
Milind Upadhyayb1a74ea2022-03-09 20:34:35 -080031 transfer_roller_speed_front:double (id: 5);
32 transfer_roller_speed_back:double (id: 12);
Henry Speiser55aa3ba2022-02-21 23:21:12 -080033
34 // Factor to multiply robot velocity by and add to roller voltage.
35 roller_speed_compensation:double (id: 6);
36
37 turret:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 7);
Austin Schuh39f26f62022-02-24 21:34:46 -080038
39 // Catapult goal state.
40 catapult:CatapultGoal (id: 8);
Ravago Jones5da06352022-03-04 20:26:24 -080041
42 // If true, fire! The robot will only fire when ready.
43 fire:bool (id: 9);
44
45 // Aborts the shooting process if the ball has been loaded into the catapult
46 // and the superstructure is in the LOADED state.
47 cancel_shot:bool (id: 10);
James Kuszmaul84083f42022-02-27 17:24:38 -080048
49 // If true, auto-track the turret to point at the goal.
50 auto_aim:bool (id: 11);
milind-u086d7262022-01-19 20:44:18 -080051}
52
Ravago Jones5da06352022-03-04 20:26:24 -080053
54
milind-u086d7262022-01-19 20:44:18 -080055root_type Goal;