blob: 185133b83ccd0541da343befe53022ad02279456 [file] [log] [blame]
Alex Perrycb7da4b2019-08-28 19:35:56 -07001include "frc971/control_loops/control_loops.fbs";
2
3namespace frc971.control_loops;
4
5table ProfiledJointStatus {
6 // Is the subsystem zeroed?
7 zeroed:bool;
8
9 // The state of the subsystem, if applicable. -1 otherwise.
10 // TODO(alex): replace with enum.
11 state:int;
12
13 // If true, we have aborted.
14 estopped:bool;
15
16 // Position of the joint.
17 position:float;
18 // Velocity of the joint in units/second.
19 velocity:float;
20 // Profiled goal position of the joint.
21 goal_position:float;
22 // Profiled goal velocity of the joint in units/second.
23 goal_velocity:float;
24 // Unprofiled goal position from absoulte zero of the joint.
25 unprofiled_goal_position:float;
26 // Unprofiled goal velocity of the joint in units/second.
27 unprofiled_goal_velocity:float;
28
29 // The estimated voltage error.
30 voltage_error:float;
31
32 // The calculated velocity with delta x/delta t
33 calculated_velocity:float;
34
35 // Components of the control loop output
36 position_power:float;
37 velocity_power:float;
38 feedforwards_power:float;
39
40 // State of the estimator.
41 estimator_state:frc971.EstimatorState;
42}
43
44table HallProfiledJointStatus {
45 // Is the subsystem zeroed?
46 zeroed:bool;
47
48 // The state of the subsystem, if applicable. -1 otherwise.
49 // TODO(alex): replace with enum.
50 state:int;
51
52 // If true, we have aborted.
53 estopped:bool;
54
55 // Position of the joint.
56 position:float;
57 // Velocity of the joint in units/second.
58 velocity:float;
59 // Profiled goal position of the joint.
60 goal_position:float;
61 // Profiled goal velocity of the joint in units/second.
62 goal_velocity:float;
63 // Unprofiled goal position from absoulte zero of the joint.
64 unprofiled_goal_position:float;
65 // Unprofiled goal velocity of the joint in units/second.
66 unprofiled_goal_velocity:float;
67
68 // The estimated voltage error.
69 voltage_error:float;
70
71 // The calculated velocity with delta x/delta t
72 calculated_velocity:float;
73
74 // Components of the control loop output
75 position_power:float;
76 velocity_power:float;
77 feedforwards_power:float;
78
79 // State of the estimator.
80 estimator_state:frc971.HallEffectAndPositionEstimatorState;
81}
82
83table PotAndAbsoluteEncoderProfiledJointStatus {
84 // Is the subsystem zeroed?
85 zeroed:bool;
86
87 // The state of the subsystem, if applicable. -1 otherwise.
88 // TODO(alex): replace with enum.
89 state:int;
90
91 // If true, we have aborted.
92 estopped:bool;
93
94 // Position of the joint.
95 position:float;
96 // Velocity of the joint in units/second.
97 velocity:float;
98 // Profiled goal position of the joint.
99 goal_position:float;
100 // Profiled goal velocity of the joint in units/second.
101 goal_velocity:float;
102 // Unprofiled goal position from absoulte zero of the joint.
103 unprofiled_goal_position:float;
104 // Unprofiled goal velocity of the joint in units/second.
105 unprofiled_goal_velocity:float;
106
107 // The estimated voltage error.
108 voltage_error:float;
109
110 // The calculated velocity with delta x/delta t
111 calculated_velocity:float;
112
113 // Components of the control loop output
114 position_power:float;
115 velocity_power:float;
116 feedforwards_power:float;
117
118 // State of the estimator.
119 estimator_state:frc971.PotAndAbsoluteEncoderEstimatorState;
120}
121
122table IndexProfiledJointStatus {
123 // Is the subsystem zeroed?
124 zeroed:bool;
125
126 // The state of the subsystem, if applicable. -1 otherwise.
127 // TODO(alex): replace with enum.
128 state:int;
129
130 // If true, we have aborted.
131 estopped:bool;
132
133 // Position of the joint.
134 position:float;
135 // Velocity of the joint in units/second.
136 velocity:float;
137 // Profiled goal position of the joint.
138 goal_position:float;
139 // Profiled goal velocity of the joint in units/second.
140 goal_velocity:float;
141 // Unprofiled goal position from absoulte zero of the joint.
142 unprofiled_goal_position:float;
143 // Unprofiled goal velocity of the joint in units/second.
144 unprofiled_goal_velocity:float;
145
146 // The estimated voltage error.
147 voltage_error:float;
148
149 // The calculated velocity with delta x/delta t
150 calculated_velocity:float;
151
152 // Components of the control loop output
153 position_power:float;
154 velocity_power:float;
155 feedforwards_power:float;
156
157 // State of the estimator.
158 estimator_state:frc971.IndexEstimatorState;
159}
160
161table AbsoluteEncoderProfiledJointStatus {
162 // Is the subsystem zeroed?
163 zeroed:bool;
164
165 // The state of the subsystem, if applicable. -1 otherwise.
166 // TODO(alex): replace with enum.
167 state:int;
168
169 // If true, we have aborted.
170 estopped:bool;
171
172 // Position of the joint.
173 position:float;
174 // Velocity of the joint in units/second.
175 velocity:float;
176 // Profiled goal position of the joint.
177 goal_position:float;
178 // Profiled goal velocity of the joint in units/second.
179 goal_velocity:float;
180 // Unprofiled goal position from absoulte zero of the joint.
181 unprofiled_goal_position:float;
182 // Unprofiled goal velocity of the joint in units/second.
183 unprofiled_goal_velocity:float;
184
185 // The estimated voltage error.
186 voltage_error:float;
187
188 // The calculated velocity with delta x/delta t
189 calculated_velocity:float;
190
191 // Components of the control loop output
192 position_power:float;
193 velocity_power:float;
194 feedforwards_power:float;
195
196 // State of the estimator.
197 estimator_state:frc971.AbsoluteEncoderEstimatorState;
198}
199
Tyler Chatow3c47f3c2020-01-29 20:45:23 -0800200table RelativeEncoderProfiledJointStatus {
201 // The state of the subsystem, if applicable. -1 otherwise.
202 // TODO(alex): replace with enum.
203 state:int;
204
205 // If true, we have aborted.
206 estopped:bool;
207
208 // Position of the joint.
209 position:float;
210 // Velocity of the joint in units/second.
211 velocity:float;
212 // Profiled goal position of the joint.
213 goal_position:float;
214 // Profiled goal velocity of the joint in units/second.
215 goal_velocity:float;
216 // Unprofiled goal position from absoulte zero of the joint.
217 unprofiled_goal_position:float;
218 // Unprofiled goal velocity of the joint in units/second.
219 unprofiled_goal_velocity:float;
220
221 // The estimated voltage error.
222 voltage_error:float;
223
224 // The calculated velocity with delta x/delta t
225 calculated_velocity:float;
226
227 // Components of the control loop output
228 position_power:float;
229 velocity_power:float;
230 feedforwards_power:float;
231
232 // State of the estimator.
233 estimator_state:frc971.RelativeEncoderEstimatorState;
234}
235
Alex Perrycb7da4b2019-08-28 19:35:56 -0700236table StaticZeroingSingleDOFProfiledSubsystemGoal {
237 unsafe_goal:double;
238
239 profile_params:frc971.ProfileParameters;
James Kuszmaul4fb29762020-02-20 19:37:41 -0800240
241 // Sets the goal velocity of the subsystem.
242 goal_velocity:double;
243
244 // If set to true, then we will ignore the profiling on this joint and pass
245 // the goal + goal velocity directly to the control loop.
246 ignore_profile:bool;
Alex Perrycb7da4b2019-08-28 19:35:56 -0700247}