blob: 52a8a08753bd5ac6175a9d62035fee17766eac44 [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001namespace 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"
7table RobotState {
8 // The PID of the process reading sensors.
9 // This is here so control loops can tell when it changes.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080010 reader_pid:int (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -070011
12 // True when outputs are enabled.
13 // Motor controllers keep going for a bit after this goes to false.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080014 outputs_enabled:bool (id: 1);
Alex Perrycb7da4b2019-08-28 19:35:56 -070015 // 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 Jonesfb6a7a52020-11-14 13:47:46 -080018 browned_out:bool (id: 2);
Alex Perrycb7da4b2019-08-28 19:35:56 -070019
20 // Whether the two sensor rails are currently working.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080021 is_3v3_active:bool (id: 3);
22 is_5v_active:bool (id: 4);
Alex Perrycb7da4b2019-08-28 19:35:56 -070023 // The current voltages measured on the two sensor rails.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080024 voltage_3v3:double (id: 5);
25 voltage_5v:double (id: 6);
Alex Perrycb7da4b2019-08-28 19:35:56 -070026
27 // The input voltage to the roboRIO.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080028 voltage_roborio_in:double (id: 7);
Alex Perrycb7da4b2019-08-28 19:35:56 -070029
30 // From the DriverStation object, aka what FMS sees and what shows up on the
31 // actual driver's station.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080032 voltage_battery:double (id: 8);
James Kuszmaulfd0f8962021-10-23 19:23:53 -070033
34 // User button state
35 user_button:bool (id: 9);
Alex Perrycb7da4b2019-08-28 19:35:56 -070036}
37
38root_type RobotState;