blob: aed829e44035243b4c8269d79c7cc2a60924ffd2 [file] [log] [blame]
Austin Schuha9df9ad2021-06-16 14:49:39 -07001load("//aos:config.bzl", "aos_config")
James Kuszmauldac091f2022-03-22 09:35:06 -07002load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
Brian Silverman100534c2015-09-07 15:51:23 -04003
Philipp Schradercc016b32021-12-30 08:59:58 -08004package(default_visibility = ["//visibility:public"])
5
Brian Silverman100534c2015-09-07 15:51:23 -04006cc_library(
James Kuszmaul61750662021-06-21 21:32:33 -07007 name = "control_loop_test",
8 testonly = True,
9 srcs = [
10 "control_loop_test.cc",
11 ],
12 hdrs = [
13 "control_loop_test.h",
14 ],
15 target_compatible_with = ["@platforms//os:linux"],
16 deps = [
17 "//aos:flatbuffers",
18 "//aos:json_to_flatbuffer",
19 "//aos/events:simulated_event_loop",
20 "//aos/testing:googletest",
21 "//aos/testing:test_logging",
22 "//aos/time",
23 "//frc971/input:joystick_state_fbs",
24 "//frc971/input:robot_state_fbs",
25 ],
26)
27
28cc_library(
29 name = "polytope",
30 hdrs = [
31 "polytope.h",
32 ],
33 deps = [
34 "@org_tuxfamily_eigen//:eigen",
35 ] + select({
36 "@platforms//os:linux": [
37 "//aos/logging",
38 "//third_party/cddlib",
39 "@com_github_google_glog//:glog",
40 ],
41 "//conditions:default": [],
42 }),
43)
44
45cc_test(
46 name = "polytope_test",
47 srcs = [
48 "polytope_test.cc",
49 ],
50 target_compatible_with = ["@platforms//os:linux"],
51 deps = [
52 ":polytope",
53 "//aos/testing:googletest",
54 "//aos/testing:test_logging",
55 "@org_tuxfamily_eigen//:eigen",
56 ],
57)
58
59cc_library(
60 name = "control_loop",
61 srcs = [
62 "control_loop.cc",
63 "control_loop-tmpl.h",
64 ],
65 hdrs = [
66 "control_loop.h",
67 ],
68 target_compatible_with = ["@platforms//os:linux"],
69 deps = [
70 "//aos/events:event_loop",
71 "//aos/events:shm_event_loop",
72 "//aos/logging",
73 "//aos/time",
74 "//aos/util:log_interval",
75 "//frc971/input:joystick_state_fbs",
76 "//frc971/input:robot_state_fbs",
77 ],
78)
79
80cc_library(
81 name = "quaternion_utils",
82 srcs = [
83 "quaternion_utils.cc",
84 ],
85 hdrs = [
86 "quaternion_utils.h",
87 ],
88 target_compatible_with = ["@platforms//os:linux"],
89 deps = [
90 "@com_github_google_glog//:glog",
91 "@org_tuxfamily_eigen//:eigen",
92 ],
93)
94
95cc_test(
96 name = "quarternion_utils_test",
97 srcs = [
98 "quaternion_utils_test.cc",
99 ],
100 target_compatible_with = ["@platforms//os:linux"],
101 deps = [
milind-ue53bf552021-12-11 14:42:00 -0800102 ":jacobian",
James Kuszmaul61750662021-06-21 21:32:33 -0700103 ":quaternion_utils",
milind-ue53bf552021-12-11 14:42:00 -0800104 ":runge_kutta",
James Kuszmaul61750662021-06-21 21:32:33 -0700105 "//aos/testing:googletest",
106 "//aos/testing:random_seed",
107 "@com_github_google_glog//:glog",
108 "@org_tuxfamily_eigen//:eigen",
109 ],
110)
111
112cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800113 name = "team_number_test_environment",
114 testonly = True,
115 srcs = [
116 "team_number_test_environment.cc",
117 ],
118 hdrs = [
119 "team_number_test_environment.h",
120 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800121 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800122 deps = [
John Park33858a32018-09-28 23:05:48 -0700123 "//aos/network:team_number",
Austin Schuha647d602018-02-18 14:05:15 -0800124 "//aos/testing:googletest",
125 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400126)
127
128cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800129 name = "hybrid_state_feedback_loop_test",
130 srcs = [
131 "hybrid_state_feedback_loop_test.cc",
132 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800133 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800134 deps = [
135 ":hybrid_state_feedback_loop",
136 "//aos/testing:googletest",
137 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400138)
139
140cc_library(
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800141 name = "pose",
142 hdrs = ["pose.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800143 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800144 deps = [
145 "//aos/util:math",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700146 "@org_tuxfamily_eigen//:eigen",
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800147 ],
148)
149
150cc_test(
151 name = "pose_test",
152 srcs = ["pose_test.cc"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800153 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul9f9676d2019-01-25 21:27:58 -0800154 deps = [
155 ":pose",
156 "//aos/testing:googletest",
157 ],
158)
159
160cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800161 name = "hall_effect_tracker",
162 hdrs = [
163 "hall_effect_tracker.h",
164 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800165 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800166 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700167 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800168 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400169)
170
James Kuszmauldac091f2022-03-22 09:35:06 -0700171flatbuffer_ts_library(
172 name = "control_loops_ts_fbs",
173 srcs = [
174 "control_loops.fbs",
175 ],
176)
177
Alex Perrycb7da4b2019-08-28 19:35:56 -0700178flatbuffer_cc_library(
179 name = "control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800180 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700181 "control_loops.fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800182 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400183)
184
185cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800186 name = "position_sensor_sim_test",
187 srcs = [
188 "position_sensor_sim_test.cc",
189 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800190 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800191 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700192 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800193 ":position_sensor_sim",
John Park33858a32018-09-28 23:05:48 -0700194 "//aos/logging",
Austin Schuha647d602018-02-18 14:05:15 -0800195 "//aos/testing:googletest",
196 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400197)
198
199cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800200 name = "position_sensor_sim",
201 testonly = True,
202 srcs = [
203 "position_sensor_sim.cc",
204 ],
205 hdrs = [
206 "position_sensor_sim.h",
207 ],
Brian Silverman6470f442018-08-05 12:08:16 -0700208 linkopts = [
209 "-lm",
210 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800211 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800212 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700213 ":control_loops_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800214 ":gaussian_noise",
Austin Schuha647d602018-02-18 14:05:15 -0800215 "//aos/testing:random_seed",
Philipp Schraderb3a057e2018-03-10 18:59:40 -0800216 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400217)
218
219cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800220 name = "gaussian_noise",
221 srcs = [
222 "gaussian_noise.cc",
223 ],
224 hdrs = [
225 "gaussian_noise.h",
226 ],
Philipp Schraderb3a057e2018-03-10 18:59:40 -0800227 linkopts = [
228 "-lm",
Austin Schuha647d602018-02-18 14:05:15 -0800229 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800230 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhbcce26a2018-03-26 23:41:24 -0700231)
232
233cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800234 name = "coerce_goal",
235 srcs = [
236 "coerce_goal.cc",
237 ],
238 hdrs = [
239 "coerce_goal.h",
240 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800241 linkopts = select({
242 "@platforms//os:linux": ["-lm"],
243 "//conditions:default": [],
244 }),
Austin Schuha647d602018-02-18 14:05:15 -0800245 deps = [
James Kuszmaul61750662021-06-21 21:32:33 -0700246 "//frc971/control_loops:polytope",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700247 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800248 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400249)
250
Lee Mracek65686142020-01-10 22:21:39 -0500251cc_test(
252 name = "coerce_goal_test",
253 srcs = [
254 "coerce_goal_test.cc",
255 ],
256 linkopts = [
257 "-lm",
258 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800259 target_compatible_with = ["@platforms//os:linux"],
Lee Mracek65686142020-01-10 22:21:39 -0500260 deps = [
261 ":coerce_goal",
Lee Mracek65686142020-01-10 22:21:39 -0500262 "//aos/testing:googletest",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700263 "//frc971/control_loops:polytope",
Lee Mracek65686142020-01-10 22:21:39 -0500264 "@org_tuxfamily_eigen//:eigen",
265 ],
266)
267
Austin Schuh4cc4fe22017-11-23 19:13:09 -0800268cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800269 name = "state_feedback_loop",
270 hdrs = [
271 "state_feedback_loop.h",
272 ],
273 deps = [
John Park33858a32018-09-28 23:05:48 -0700274 "//aos:macros",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700275 "@org_tuxfamily_eigen//:eigen",
Philipp Schraderdada1072020-11-24 11:34:46 -0800276 ] + select({
277 "@platforms//os:linux": ["//aos/logging"],
278 "//conditions:default": [],
279 }),
Brian Silverman100534c2015-09-07 15:51:23 -0400280)
Brian Silverman2b1957a2016-02-14 20:29:57 -0500281
282cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800283 name = "hybrid_state_feedback_loop",
284 hdrs = [
285 "hybrid_state_feedback_loop.h",
286 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800287 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800288 deps = [
Austin Schuh9b881ae2019-01-04 07:29:20 +1100289 ":c2d",
Austin Schuha647d602018-02-18 14:05:15 -0800290 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700291 "//aos:macros",
John Park33858a32018-09-28 23:05:48 -0700292 "//aos/logging",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700293 "//frc971/control_loops:control_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700294 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800295 ],
Brian Silverman2b1957a2016-02-14 20:29:57 -0500296)
Austin Schuhacd335a2017-01-01 16:20:54 -0800297
298cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800299 name = "simple_capped_state_feedback_loop",
300 hdrs = [
301 "simple_capped_state_feedback_loop.h",
302 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800303 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800304 deps = [
305 ":state_feedback_loop",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700306 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800307 ],
308)
309
310cc_library(
311 name = "runge_kutta",
312 hdrs = [
313 "runge_kutta.h",
314 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800315 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800316 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700317 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800318 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800319)
320
321cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800322 name = "runge_kutta_test",
323 srcs = [
324 "runge_kutta_test.cc",
325 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800326 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800327 deps = [
328 ":runge_kutta",
329 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700330 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800331 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800332)
Austin Schuh473a5652017-02-05 01:30:42 -0800333
Austin Schuh173a1592018-12-19 16:20:54 +1100334cc_library(
335 name = "fixed_quadrature",
336 hdrs = [
337 "fixed_quadrature.h",
338 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800339 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh173a1592018-12-19 16:20:54 +1100340)
341
342cc_test(
343 name = "fixed_quadrature_test",
344 srcs = [
345 "fixed_quadrature_test.cc",
346 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800347 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh173a1592018-12-19 16:20:54 +1100348 deps = [
349 ":fixed_quadrature",
350 "//aos/testing:googletest",
351 ],
352)
353
James Kuszmauldac091f2022-03-22 09:35:06 -0700354flatbuffer_ts_library(
355 name = "profiled_subsystem_ts_fbs",
356 srcs = [
357 "profiled_subsystem.fbs",
358 ],
359 deps = [
360 ":control_loops_ts_fbs",
361 ],
362)
363
Alex Perrycb7da4b2019-08-28 19:35:56 -0700364flatbuffer_cc_library(
365 name = "profiled_subsystem_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800366 srcs = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700367 "profiled_subsystem.fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800368 ],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700369 includes = [
370 ":control_loops_fbs_includes",
Austin Schuh9fe68f72019-08-10 19:32:03 -0700371 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800372 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh9fe68f72019-08-10 19:32:03 -0700373)
374
Austin Schuh473a5652017-02-05 01:30:42 -0800375cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800376 name = "profiled_subsystem",
377 srcs = [
378 "profiled_subsystem.cc",
379 ],
380 hdrs = [
381 "profiled_subsystem.h",
382 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800383 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800384 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700385 ":control_loops_fbs",
386 ":profiled_subsystem_fbs",
Austin Schuha647d602018-02-18 14:05:15 -0800387 ":simple_capped_state_feedback_loop",
388 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700389 "//aos/util:trapezoid_profile",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700390 "//frc971/control_loops:control_loop",
Austin Schuha647d602018-02-18 14:05:15 -0800391 "//frc971/zeroing",
392 ],
Austin Schuh473a5652017-02-05 01:30:42 -0800393)
Austin Schuha647d602018-02-18 14:05:15 -0800394
395cc_library(
396 name = "jacobian",
397 hdrs = [
398 "jacobian.h",
399 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800400 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800401 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700402 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800403 ],
404)
405
406cc_test(
407 name = "jacobian_test",
408 srcs = [
409 "jacobian_test.cc",
410 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800411 target_compatible_with = ["@platforms//os:linux"],
Austin Schuha647d602018-02-18 14:05:15 -0800412 deps = [
413 ":jacobian",
414 "//aos/testing:googletest",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700415 "@org_tuxfamily_eigen//:eigen",
Austin Schuha647d602018-02-18 14:05:15 -0800416 ],
417)
418
James Kuszmaul59a5c612019-01-22 07:56:08 -0800419cc_test(
420 name = "c2d_test",
421 srcs = [
422 "c2d_test.cc",
423 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800424 target_compatible_with = ["@platforms//os:linux"],
James Kuszmaul59a5c612019-01-22 07:56:08 -0800425 visibility = ["//visibility:public"],
426 deps = [
427 ":c2d",
428 ":runge_kutta",
429 "//aos/testing:googletest",
430 ],
431)
432
Austin Schuh03785132018-02-19 18:29:06 -0800433cc_library(
Austin Schuh9b881ae2019-01-04 07:29:20 +1100434 name = "c2d",
435 hdrs = [
436 "c2d.h",
437 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800438 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh9b881ae2019-01-04 07:29:20 +1100439 visibility = ["//visibility:public"],
440 deps = [
James Kuszmaul651fc3f2019-05-15 21:14:25 -0700441 "//aos/time",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700442 "@org_tuxfamily_eigen//:eigen",
Austin Schuh9b881ae2019-01-04 07:29:20 +1100443 ],
444)
445
446cc_library(
Austin Schuh03785132018-02-19 18:29:06 -0800447 name = "dlqr",
448 hdrs = [
449 "dlqr.h",
450 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800451 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh03785132018-02-19 18:29:06 -0800452 visibility = ["//visibility:public"],
453 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700454 "@org_tuxfamily_eigen//:eigen",
Austin Schuh03785132018-02-19 18:29:06 -0800455 "@slycot_repo//:slicot",
456 ],
457)
Brian Silverman6470f442018-08-05 12:08:16 -0700458
459py_library(
460 name = "python_init",
461 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800462 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700463 visibility = ["//visibility:public"],
464 deps = ["//frc971:python_init"],
465)
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800466
467cc_library(
468 name = "binomial",
469 hdrs = ["binomial.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800470 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800471)
472
473cc_test(
474 name = "binomial_test",
475 srcs = [
476 "binomial_test.cc",
477 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800478 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe6e7ea52019-01-13 17:26:36 -0800479 deps = [
480 ":binomial",
481 "//aos/testing:googletest",
482 ],
483)
Tyler Chatow12581562019-01-26 20:42:42 -0800484
485cc_library(
486 name = "capped_test_plant",
487 testonly = True,
488 srcs = [
489 "capped_test_plant.cc",
490 ],
491 hdrs = [
492 "capped_test_plant.h",
493 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800494 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800495 deps = [
496 ":state_feedback_loop",
497 "//aos/testing:googletest",
498 ],
499)
500
501cc_library(
502 name = "static_zeroing_single_dof_profiled_subsystem",
Tyler Chatow12581562019-01-26 20:42:42 -0800503 hdrs = [
504 "static_zeroing_single_dof_profiled_subsystem.h",
505 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800506 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800507 deps = [
508 "//frc971/control_loops:profiled_subsystem",
509 ],
510)
511
512genrule(
513 name = "genrule_static_zeroing_single_dof_profiled_subsystem_test",
514 outs = [
515 "static_zeroing_single_dof_profiled_subsystem_test_plant.h",
516 "static_zeroing_single_dof_profiled_subsystem_test_plant.cc",
517 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h",
518 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc",
519 ],
520 cmd = "$(location //frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test) $(OUTS)",
Philipp Schraderdada1072020-11-24 11:34:46 -0800521 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800522 tools = [
523 "//frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test",
524 ],
525)
526
527cc_library(
528 name = "static_zeroing_single_dof_profiled_subsystem_test_plants",
529 srcs = [
530 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc",
531 "static_zeroing_single_dof_profiled_subsystem_test_plant.cc",
532 ],
533 hdrs = [
534 "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h",
535 "static_zeroing_single_dof_profiled_subsystem_test_plant.h",
536 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800537 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800538 deps = [
539 ":state_feedback_loop",
540 ],
541)
542
Alex Perrycb7da4b2019-08-28 19:35:56 -0700543flatbuffer_cc_library(
Austin Schuha9df9ad2021-06-16 14:49:39 -0700544 name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700545 srcs = [
Austin Schuha9df9ad2021-06-16 14:49:39 -0700546 "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal.fbs",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700547 ],
Austin Schuha9df9ad2021-06-16 14:49:39 -0700548 gen_reflections = 1,
549 includes = [
550 ":control_loops_fbs_includes",
551 ":profiled_subsystem_fbs_includes",
552 ],
553 target_compatible_with = ["@platforms//os:linux"],
554)
555
556flatbuffer_cc_library(
557 name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
558 srcs = [
559 "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output.fbs",
560 ],
561 gen_reflections = 1,
562 target_compatible_with = ["@platforms//os:linux"],
563)
564
565flatbuffer_cc_library(
566 name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
567 srcs = [
568 "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position.fbs",
569 ],
570 gen_reflections = 1,
571 includes = [
572 ":control_loops_fbs_includes",
573 ],
574 target_compatible_with = ["@platforms//os:linux"],
575)
576
577flatbuffer_cc_library(
578 name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
579 srcs = [
580 "static_zeroing_single_dof_profiled_subsystem_test_absolute_position.fbs",
581 ],
582 gen_reflections = 1,
583 includes = [
584 ":control_loops_fbs_includes",
585 ],
586 target_compatible_with = ["@platforms//os:linux"],
587)
588
589flatbuffer_cc_library(
590 name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
591 srcs = [
592 "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status.fbs",
593 ],
594 gen_reflections = 1,
595 includes = [
596 ":control_loops_fbs_includes",
597 ":profiled_subsystem_fbs_includes",
598 ],
599 target_compatible_with = ["@platforms//os:linux"],
600)
601
602flatbuffer_cc_library(
603 name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
604 srcs = [
605 "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status.fbs",
606 ],
607 gen_reflections = 1,
Alex Perrycb7da4b2019-08-28 19:35:56 -0700608 includes = [
609 ":control_loops_fbs_includes",
610 ":profiled_subsystem_fbs_includes",
611 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800612 target_compatible_with = ["@platforms//os:linux"],
Alex Perrycb7da4b2019-08-28 19:35:56 -0700613)
614
Tyler Chatow12581562019-01-26 20:42:42 -0800615cc_test(
616 name = "static_zeroing_single_dof_profiled_subsystem_test",
617 srcs = [
618 "static_zeroing_single_dof_profiled_subsystem_test.cc",
619 ],
Austin Schuha9df9ad2021-06-16 14:49:39 -0700620 data = [
621 ":static_zeroing_single_dof_profiled_subsystem_test_config",
622 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800623 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow12581562019-01-26 20:42:42 -0800624 deps = [
625 ":capped_test_plant",
626 ":position_sensor_sim",
627 ":static_zeroing_single_dof_profiled_subsystem",
Austin Schuha9df9ad2021-06-16 14:49:39 -0700628 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
629 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
Tyler Chatow12581562019-01-26 20:42:42 -0800630 ":static_zeroing_single_dof_profiled_subsystem_test_plants",
Austin Schuha9df9ad2021-06-16 14:49:39 -0700631 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
632 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
633 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
634 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
Tyler Chatow12581562019-01-26 20:42:42 -0800635 "//aos/testing:googletest",
Austin Schuh0a3c9d42021-07-15 22:36:24 -0700636 "//frc971/control_loops:control_loop_test",
Tyler Chatow12581562019-01-26 20:42:42 -0800637 ],
638)
Austin Schuha9df9ad2021-06-16 14:49:39 -0700639
640aos_config(
641 name = "static_zeroing_single_dof_profiled_subsystem_test_config",
642 src = "static_zeroing_single_dof_profiled_subsystem_test_config_source.json",
643 flatbuffers = [
644 "//frc971/input:joystick_state_fbs",
645 "//frc971/input:robot_state_fbs",
646 "//aos/logging:log_message_fbs",
647 "//aos/events:event_loop_fbs",
648 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs",
649 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs",
650 ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs",
651 ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs",
652 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs",
653 ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs",
654 ],
655 target_compatible_with = ["@platforms//os:linux"],
656)