blob: 49575fb706b1c82e3871aef2783899f8ba5d5019 [file] [log] [blame]
Comran Morshed2a97bc82016-01-16 17:27:01 +00001package y2016.control_loops;
2
3import "aos/common/controls/control_loops.q";
4import "frc971/control_loops/control_loops.q";
5
6queue_group ShooterQueue {
7 implements aos.control_loops.ControlLoop;
8
Comran Morshedcde50322016-01-18 15:10:36 +00009 // All angles are in radians, and angular velocities are in rad/sec. For all
10 // angular velocities, positive is shooting the ball out of the robot.
Comran Morshed2a97bc82016-01-16 17:27:01 +000011
Comran Morshedcde50322016-01-18 15:10:36 +000012 message Goal {
13 // Angular velocity goals in rad/sec.
14 double angular_velocity_left;
15 double angular_velocity_right;
Comran Morshed2a97bc82016-01-16 17:27:01 +000016 };
17
18 message Position {
Comran Morshedcde50322016-01-18 15:10:36 +000019 // Wheel angle in rad/sec.
20 double theta_left;
21 double theta_right;
22 };
23
24 message Status {
25 bool ready_left;
26 bool ready_right;
27 // Is the shooter ready to shoot?
28 bool ready_both;
29
30 // Average angular velocities over dt * kHistoryLength.
31 double avg_angular_velocity_left;
32 double avg_angular_velocity_right;
33 };
34
35 message Output {
36 double voltage_left;
37 double voltage_right;
Comran Morshed2a97bc82016-01-16 17:27:01 +000038 };
39
40 queue Goal goal;
41 queue Position position;
Comran Morshedcde50322016-01-18 15:10:36 +000042 queue Output output;
Comran Morshed2a97bc82016-01-16 17:27:01 +000043 queue Status status;
44};
45
46queue_group ShooterQueue shooter_queue;