Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 1 | package y2016.control_loops; |
| 2 | |
| 3 | import "aos/common/controls/control_loops.q"; |
| 4 | import "frc971/control_loops/control_loops.q"; |
| 5 | |
| 6 | queue_group ShooterQueue { |
| 7 | implements aos.control_loops.ControlLoop; |
| 8 | |
Comran Morshed | cde5032 | 2016-01-18 15:10:36 +0000 | [diff] [blame^] | 9 | // 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 Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 11 | |
Comran Morshed | cde5032 | 2016-01-18 15:10:36 +0000 | [diff] [blame^] | 12 | message Goal { |
| 13 | // Angular velocity goals in rad/sec. |
| 14 | double angular_velocity_left; |
| 15 | double angular_velocity_right; |
Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 16 | }; |
| 17 | |
| 18 | message Position { |
Comran Morshed | cde5032 | 2016-01-18 15:10:36 +0000 | [diff] [blame^] | 19 | // 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 Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | queue Goal goal; |
| 41 | queue Position position; |
Comran Morshed | cde5032 | 2016-01-18 15:10:36 +0000 | [diff] [blame^] | 42 | queue Output output; |
Comran Morshed | 2a97bc8 | 2016-01-16 17:27:01 +0000 | [diff] [blame] | 43 | queue Status status; |
| 44 | }; |
| 45 | |
| 46 | queue_group ShooterQueue shooter_queue; |