blob: 84648aca68bbe230ab9943eb13d2775b2803faec [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001include "frc971/control_loops/control_loops.fbs";
2
3namespace y2016.control_loops.superstructure;
4
5table JointState {
6 // Angle of the joint in radians.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -08007 angle:float (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -07008 // Angular velocity of the joint in radians/second.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -08009 angular_velocity:float (id: 1);
Alex Perrycb7da4b2019-08-28 19:35:56 -070010 // Profiled goal angle of the joint in radians.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080011 goal_angle:float (id: 2);
Alex Perrycb7da4b2019-08-28 19:35:56 -070012 // Profiled goal angular velocity of the joint in radians/second.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080013 goal_angular_velocity:float (id: 3);
Alex Perrycb7da4b2019-08-28 19:35:56 -070014 // Unprofiled goal angle of the joint in radians.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080015 unprofiled_goal_angle:float (id: 4);
Alex Perrycb7da4b2019-08-28 19:35:56 -070016 // Unprofiled goal angular velocity of the joint in radians/second.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080017 unprofiled_goal_angular_velocity:float (id: 5);
Alex Perrycb7da4b2019-08-28 19:35:56 -070018
19 // The estimated voltage error.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080020 voltage_error:float (id: 6);
Alex Perrycb7da4b2019-08-28 19:35:56 -070021
22 // The calculated velocity with delta x/delta t
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080023 calculated_velocity:float (id: 7);
Alex Perrycb7da4b2019-08-28 19:35:56 -070024
25 // Components of the control loop output
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080026 position_power:float (id: 8);
27 velocity_power:float (id: 9);
28 feedforwards_power:float (id: 10);
Alex Perrycb7da4b2019-08-28 19:35:56 -070029
30 // State of the estimator.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080031 estimator_state:frc971.EstimatorState (id: 11);
Alex Perrycb7da4b2019-08-28 19:35:56 -070032}
33
34table Status {
35 // Are the superstructure subsystems zeroed?
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080036 zeroed:bool (id: 0);
Alex Perrycb7da4b2019-08-28 19:35:56 -070037
38 // If true, we have aborted.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080039 estopped:bool (id: 1);
Alex Perrycb7da4b2019-08-28 19:35:56 -070040
41 // The internal state of the state machine.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080042 state:int (id: 2);
Alex Perrycb7da4b2019-08-28 19:35:56 -070043
44
45 // Estimated angles and angular velocities of the superstructure subsystems.
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080046 intake:JointState (id: 3);
47 shoulder:JointState (id: 4);
48 wrist:JointState (id: 5);
Alex Perrycb7da4b2019-08-28 19:35:56 -070049
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080050 shoulder_controller_index:int (id: 6);
Alex Perrycb7da4b2019-08-28 19:35:56 -070051
52 // Is the superstructure collided?
Ravago Jonesfb6a7a52020-11-14 13:47:46 -080053 is_collided:bool (id: 7);
Alex Perrycb7da4b2019-08-28 19:35:56 -070054}
55
56root_type Status;