blob: 990234a3a2117e0f0b7ba67ba3f4d14569605a2a [file] [log] [blame]
Stephan Massaltd021f972020-01-05 20:41:23 -08001include "frc971/control_loops/profiled_subsystem.fbs";
2
3namespace y2020.control_loops.superstructure;
4
Tyler Chatowcf413662020-02-09 14:36:36 -08005table ShooterGoal {
6 // Angular velocity in rad/s of the slowest (lowest) wheel in the kicker.
7 // Positive is shooting the ball.
Austin Schuhd7851b02020-11-14 13:46:27 -08008 velocity_accelerator:double (id: 0);
Tyler Chatowcf413662020-02-09 14:36:36 -08009
10 // Angular velocity in rad/s of the flywheel. Positive is shooting.
Austin Schuhd7851b02020-11-14 13:46:27 -080011 velocity_finisher:double (id: 1);
Tyler Chatowcf413662020-02-09 14:36:36 -080012}
13
Stephan Massaltd021f972020-01-05 20:41:23 -080014table Goal {
Sabina Davis70d5e912020-01-31 21:10:37 -080015 // Zero is at the horizontal, positive towards the front (meters on the lead screw).
Tyler Chatowcf413662020-02-09 14:36:36 -080016 // Only applies if hood_tracking = false.
milind upadhyayaec1aee2020-10-13 13:44:33 -070017 hood:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 0);
Sabina Davis6b61de32020-02-02 12:42:51 -080018
Sabina Davis5187f862020-02-09 13:16:51 -080019 // Positive = counterclockwise from above; rotates Wheel of Fortune clockwise
20 // Zero is relative to start.
milind upadhyayaec1aee2020-10-13 13:44:33 -070021 control_panel:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 1);
Sabina Davis5187f862020-02-09 13:16:51 -080022
Sabina Davis6737b092020-02-17 12:59:32 -080023 // 0 = Linkage on sprocket is pointing straight up
24 // Positive = forward
milind upadhyayaec1aee2020-10-13 13:44:33 -070025 intake:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 2);
Tyler Chatow1879acc2020-02-01 13:26:48 -080026
John Park0a245a02020-02-02 14:10:15 -080027 // Positive is rollers intaking to Washing Machine.
milind upadhyayaec1aee2020-10-13 13:44:33 -070028 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 Chatow1879acc2020-02-01 13:26:48 -080032
Austin Schuh2fb23642020-02-29 15:10:51 -080033 // 0 = facing the back of the robot. Positive rotates counterclockwise.
milind upadhyayaec1aee2020-10-13 13:44:33 -070034 turret:frc971.control_loops.StaticZeroingSingleDOFProfiledSubsystemGoal (id: 4);
Tyler Chatowcf413662020-02-09 14:36:36 -080035
36 // Only applies if shooter_tracking = false.
milind upadhyayaec1aee2020-10-13 13:44:33 -070037 shooter:ShooterGoal (id: 5);
Tyler Chatowcf413662020-02-09 14:36:36 -080038
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 upadhyayaec1aee2020-10-13 13:44:33 -070041 shooting:bool (id: 6);
Tyler Chatowcf413662020-02-09 14:36:36 -080042
43 // Whether the hood should adjust its position automatically.
milind upadhyayaec1aee2020-10-13 13:44:33 -070044 hood_tracking:bool (id: 7);
Tyler Chatowcf413662020-02-09 14:36:36 -080045
46 // Whether the turret should follow the target automatically.
milind upadhyayaec1aee2020-10-13 13:44:33 -070047 turret_tracking:bool (id: 8);
Tyler Chatowcf413662020-02-09 14:36:36 -080048
49 // Whether the kicker and flywheel should choose a velocity automatically.
milind upadhyayaec1aee2020-10-13 13:44:33 -070050 shooter_tracking:bool (id: 9);
Sabina Davis6737b092020-02-17 12:59:32 -080051
Ravago Jonesf8b7bfe2021-10-09 16:25:29 -070052 // Whether to serialize a ball under the accelerator tower
53 // so it is ready to shoot.
54 intake_preloading:bool (id: 12);
55
Sabina Davis6737b092020-02-17 12:59:32 -080056 // Positive is deploying climber and to climb; cannot run in reverse
milind upadhyayaec1aee2020-10-13 13:44:33 -070057 climber_voltage:float (id: 10);
Stephan Massaltd021f972020-01-05 20:41:23 -080058}
59
60root_type Goal;