Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 1 | namespace y2016.control_loops.superstructure; |
| 2 | |
| 3 | table Goal { |
| 4 | // Zero on the intake is when the horizontal tube stock members are level |
| 5 | // with the top frame rails of the robot. This will be essentially when we |
| 6 | // are in the intaking position. Positive is up. The angle is measured |
| 7 | // relative to the top |
| 8 | // of the robot frame. |
| 9 | // Zero on the shoulder is when the shoulder is down against the hard stop |
| 10 | // blocks. Positive is up. The angle is measured relative to the top of |
| 11 | // the robot frame. |
| 12 | // Zero on the wrist is horizontal and landed in the bellypan. Positive is |
| 13 | // the same direction as the shoulder. The angle is measured relative to |
| 14 | // the top of the robot frame. For calibration, 0 is measured as parallel |
| 15 | // to the big frame supporting the shooter. |
| 16 | |
| 17 | // Goal angles and angular velocities of the superstructure subsystems. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 18 | angle_intake:double (id: 0); |
| 19 | angle_shoulder:double (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 20 | // In relation to the ground plane. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 21 | angle_wrist:double (id: 2); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 22 | |
| 23 | // Caps on velocity/acceleration for profiling. 0 for the default. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 24 | max_angular_velocity_intake:float (id: 3); |
| 25 | max_angular_velocity_shoulder:float (id: 4); |
| 26 | max_angular_velocity_wrist:float (id: 5); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 27 | |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 28 | max_angular_acceleration_intake:float (id: 6); |
| 29 | max_angular_acceleration_shoulder:float (id: 7); |
| 30 | max_angular_acceleration_wrist:float (id: 8); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 31 | |
| 32 | // Voltage to send to the rollers. Positive is sucking in. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 33 | voltage_top_rollers:float (id: 9); |
| 34 | voltage_bottom_rollers:float (id: 10); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 35 | |
| 36 | // Voltage to sent to the climber. Positive is pulling the robot up. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 37 | voltage_climber:float (id: 11); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 38 | // If true, unlatch the climber and allow it to unfold. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 39 | unfold_climber:bool (id: 12); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 40 | |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 41 | force_intake:bool (id: 13); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 42 | |
| 43 | // If true, release the latch which holds the traverse mechanism in the |
| 44 | // middle. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 45 | traverse_unlatched:bool (id: 14); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 46 | // If true, fire the traverse mechanism down. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 47 | traverse_down:bool (id: 15); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | root_type Goal; |