Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 1 | namespace y2016.control_loops.shooter; |
| 2 | |
| 3 | // All angles are in radians, and angular velocities are in radians/second. |
| 4 | // For all angular velocities, positive is shooting the ball out of the robot. |
| 5 | table Goal { |
| 6 | // Angular velocity goals in radians/second. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 7 | angular_velocity:double (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 8 | |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 9 | clamp_open:bool (id: 1); // True to release our clamp on the ball. |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 10 | // True to push the ball into the shooter. |
| 11 | // If we are in the act of shooting with a goal velocity != 0, wait until it |
| 12 | // is up to speed, push the ball into the shooter, and then wait until it |
| 13 | // spins up and down before letting the piston be released. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 14 | push_to_shooter:bool (id: 2); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 15 | |
| 16 | // Forces the lights on. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 17 | force_lights_on:bool (id: 3); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 18 | |
| 19 | // If true, the robot is shooting forwards. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 20 | shooting_forwards:bool (id: 4); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 21 | } |
| 22 | |
| 23 | root_type Goal; |