Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 1 | namespace aos; |
| 2 | |
| 3 | // This message is sent out on this queue when sensors are read. It contains |
| 4 | // global robot state and information about whether the process reading sensors |
| 5 | // has been restarted, along with all counters etc it keeps track of. It is |
| 6 | // published on "/aos" |
| 7 | table RobotState { |
| 8 | // The PID of the process reading sensors. |
| 9 | // This is here so control loops can tell when it changes. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 10 | reader_pid:int (id: 0); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 11 | |
| 12 | // True when outputs are enabled. |
| 13 | // Motor controllers keep going for a bit after this goes to false. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 14 | outputs_enabled:bool (id: 1); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 15 | // Indicates whether something is browned out (I think motor controller |
| 16 | // outputs). IMPORTANT: This is NOT !outputs_enabled. outputs_enabled goes to |
| 17 | // false for other reasons too (disabled, e-stopped, maybe more). |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 18 | browned_out:bool (id: 2); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 19 | |
| 20 | // Whether the two sensor rails are currently working. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 21 | is_3v3_active:bool (id: 3); |
| 22 | is_5v_active:bool (id: 4); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 23 | // The current voltages measured on the two sensor rails. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 24 | voltage_3v3:double (id: 5); |
| 25 | voltage_5v:double (id: 6); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 26 | |
| 27 | // The input voltage to the roboRIO. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 28 | voltage_roborio_in:double (id: 7); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 29 | |
| 30 | // From the DriverStation object, aka what FMS sees and what shows up on the |
| 31 | // actual driver's station. |
Ravago Jones | fb6a7a5 | 2020-11-14 13:47:46 -0800 | [diff] [blame] | 32 | voltage_battery:double (id: 8); |
James Kuszmaul | fd0f896 | 2021-10-23 19:23:53 -0700 | [diff] [blame] | 33 | |
| 34 | // User button state |
| 35 | user_button:bool (id: 9); |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | root_type RobotState; |