blob: 8baf40e31110de9ff8cfef2f2409ec75e00e2190 [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;
Stephan Massalta769ca22019-01-09 05:29:13 +000019 // Reported wrapping of the spring
20 spring_wrapped:int;
Alex Perrycb7da4b2019-08-28 19:35:56 -070021
22 // Estimated position of the joint.
23 motor_position:float;
24 // Estimated velocity of the joint in units/second.
25 motor_velocity:float;
26
27 // Goal position of the joint.
28 goal_position:float;
29 // Goal velocity of the joint in units/second.
30 goal_velocity:float;
31
32 // The calculated velocity with delta x/delta t
33 calculated_velocity:float;
34
35 // The voltage given last cycle;
36 delayed_voltage:float;
37
38 // State of the estimator.
39 estimator_state:frc971.PotAndAbsoluteEncoderEstimatorState;
40}
41
42table ArmStatus {
43 // State of the estimators.
44 proximal_estimator_state:frc971.PotAndAbsoluteEncoderEstimatorState;
45 distal_estimator_state:frc971.PotAndAbsoluteEncoderEstimatorState;
46
47 // The node we are currently going to.
48 current_node:uint;
49 // Distance (in radians) to the end of the path.
50 path_distance_to_go:float;
51 // Goal position and velocity (radians)
52 goal_theta0:float;
53 goal_theta1:float;
54 goal_omega0:float;
55 goal_omega1:float;
56
57 // Current position and velocity (radians)
58 theta0:float;
59 theta1:float;
60
61 omega0:float;
62 omega1:float;
63
64 // Estimated voltage error for the two joints.
65 voltage_error0:float;
66 voltage_error1:float;
67
68 // True if we are zeroed.
69 zeroed:bool;
70
71 // True if the arm is zeroed.
72 estopped:bool;
73
74 // The current state machine state.
75 state:uint;
76
77 grab_state:uint;
78
79 // The number of times the LQR solver failed.
80 failed_solutions:uint;
81}
82
83table Status {
84 // Are all the subsystems zeroed?
85 zeroed:bool;
86
87 // If true, any of the subsystems have aborted.
88 estopped:bool;
89
90 // Status of both intake sides.
91 left_intake:IntakeSideStatus;
92 right_intake:IntakeSideStatus;
93
94 arm:ArmStatus;
95
96 filtered_box_velocity:double;
97 rotation_state:uint;
98}
99
100root_type Status;