blob: af2d1ab95bba986963c4db1f033692252c901654 [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001include "frc971/control_loops/control_loops.fbs";
2
3namespace y2018.control_loops.superstructure;
4
5table IntakeSideStatus {
6 // Is the subsystem zeroed?
7 zeroed:bool;
8
9 // The state of the subsystem, if applicable.
10 state:int;
11
12 // If true, we have aborted.
13 estopped:bool;
14
15 // Estimated position of the spring.
16 spring_position:float;
17 // Estimated velocity of the spring in units/second.
18 spring_velocity:float;
19
20 // Estimated position of the joint.
21 motor_position:float;
22 // Estimated velocity of the joint in units/second.
23 motor_velocity:float;
24
25 // Goal position of the joint.
26 goal_position:float;
27 // Goal velocity of the joint in units/second.
28 goal_velocity:float;
29
30 // The calculated velocity with delta x/delta t
31 calculated_velocity:float;
32
33 // The voltage given last cycle;
34 delayed_voltage:float;
35
36 // State of the estimator.
37 estimator_state:frc971.PotAndAbsoluteEncoderEstimatorState;
38}
39
40table ArmStatus {
41 // State of the estimators.
42 proximal_estimator_state:frc971.PotAndAbsoluteEncoderEstimatorState;
43 distal_estimator_state:frc971.PotAndAbsoluteEncoderEstimatorState;
44
45 // The node we are currently going to.
46 current_node:uint;
47 // Distance (in radians) to the end of the path.
48 path_distance_to_go:float;
49 // Goal position and velocity (radians)
50 goal_theta0:float;
51 goal_theta1:float;
52 goal_omega0:float;
53 goal_omega1:float;
54
55 // Current position and velocity (radians)
56 theta0:float;
57 theta1:float;
58
59 omega0:float;
60 omega1:float;
61
62 // Estimated voltage error for the two joints.
63 voltage_error0:float;
64 voltage_error1:float;
65
66 // True if we are zeroed.
67 zeroed:bool;
68
69 // True if the arm is zeroed.
70 estopped:bool;
71
72 // The current state machine state.
73 state:uint;
74
75 grab_state:uint;
76
77 // The number of times the LQR solver failed.
78 failed_solutions:uint;
79}
80
81table Status {
82 // Are all the subsystems zeroed?
83 zeroed:bool;
84
85 // If true, any of the subsystems have aborted.
86 estopped:bool;
87
88 // Status of both intake sides.
89 left_intake:IntakeSideStatus;
90 right_intake:IntakeSideStatus;
91
92 arm:ArmStatus;
93
94 filtered_box_velocity:double;
95 rotation_state:uint;
96}
97
98root_type Status;