Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 1 | load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 2 | load("//aos:config.bzl", "aos_config") |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 3 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 4 | |
Philipp Schrader | cc016b3 | 2021-12-30 08:59:58 -0800 | [diff] [blame] | 5 | package(default_visibility = ["//visibility:public"]) |
| 6 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 7 | cc_library( |
Niko Sohmers | e69ee2d | 2022-09-28 19:52:27 -0700 | [diff] [blame] | 8 | name = "subsystem_simulator", |
| 9 | testonly = True, |
| 10 | hdrs = [ |
| 11 | "subsystem_simulator.h", |
| 12 | ], |
| 13 | target_compatible_with = ["@platforms//os:linux"], |
| 14 | deps = [ |
| 15 | "//frc971:constants", |
| 16 | "//frc971/control_loops:capped_test_plant", |
| 17 | "//frc971/control_loops:control_loop_test", |
| 18 | "//frc971/control_loops:position_sensor_sim", |
| 19 | ], |
| 20 | ) |
| 21 | |
| 22 | cc_library( |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 23 | name = "control_loop_test", |
| 24 | testonly = True, |
| 25 | srcs = [ |
| 26 | "control_loop_test.cc", |
| 27 | ], |
| 28 | hdrs = [ |
| 29 | "control_loop_test.h", |
| 30 | ], |
| 31 | target_compatible_with = ["@platforms//os:linux"], |
| 32 | deps = [ |
| 33 | "//aos:flatbuffers", |
| 34 | "//aos:json_to_flatbuffer", |
| 35 | "//aos/events:simulated_event_loop", |
Austin Schuh | 0debde1 | 2022-08-17 16:25:17 -0700 | [diff] [blame] | 36 | "//aos/network:testing_time_converter", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 37 | "//aos/testing:googletest", |
| 38 | "//aos/testing:test_logging", |
| 39 | "//aos/time", |
| 40 | "//frc971/input:joystick_state_fbs", |
| 41 | "//frc971/input:robot_state_fbs", |
| 42 | ], |
| 43 | ) |
| 44 | |
| 45 | cc_library( |
| 46 | name = "polytope", |
| 47 | hdrs = [ |
| 48 | "polytope.h", |
| 49 | ], |
| 50 | deps = [ |
| 51 | "@org_tuxfamily_eigen//:eigen", |
| 52 | ] + select({ |
| 53 | "@platforms//os:linux": [ |
| 54 | "//aos/logging", |
| 55 | "//third_party/cddlib", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 56 | "@com_google_absl//absl/log", |
| 57 | "@com_google_absl//absl/log:check", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 58 | ], |
| 59 | "//conditions:default": [], |
| 60 | }), |
| 61 | ) |
| 62 | |
| 63 | cc_test( |
| 64 | name = "polytope_test", |
| 65 | srcs = [ |
| 66 | "polytope_test.cc", |
| 67 | ], |
| 68 | target_compatible_with = ["@platforms//os:linux"], |
| 69 | deps = [ |
| 70 | ":polytope", |
| 71 | "//aos/testing:googletest", |
| 72 | "//aos/testing:test_logging", |
| 73 | "@org_tuxfamily_eigen//:eigen", |
| 74 | ], |
| 75 | ) |
| 76 | |
| 77 | cc_library( |
| 78 | name = "control_loop", |
| 79 | srcs = [ |
| 80 | "control_loop.cc", |
| 81 | "control_loop-tmpl.h", |
| 82 | ], |
| 83 | hdrs = [ |
| 84 | "control_loop.h", |
| 85 | ], |
| 86 | target_compatible_with = ["@platforms//os:linux"], |
| 87 | deps = [ |
Stephan Pleines | 743f83a | 2024-02-02 18:32:09 -0800 | [diff] [blame] | 88 | "//aos/actions:action_lib", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 89 | "//aos/events:event_loop", |
| 90 | "//aos/events:shm_event_loop", |
Nikolai Sohmers | 2df6f30 | 2024-05-30 13:12:29 -0700 | [diff] [blame] | 91 | "//aos/flatbuffers:static_table", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 92 | "//aos/logging", |
| 93 | "//aos/time", |
| 94 | "//aos/util:log_interval", |
| 95 | "//frc971/input:joystick_state_fbs", |
| 96 | "//frc971/input:robot_state_fbs", |
| 97 | ], |
| 98 | ) |
| 99 | |
| 100 | cc_library( |
| 101 | name = "quaternion_utils", |
| 102 | srcs = [ |
| 103 | "quaternion_utils.cc", |
| 104 | ], |
| 105 | hdrs = [ |
| 106 | "quaternion_utils.h", |
| 107 | ], |
| 108 | target_compatible_with = ["@platforms//os:linux"], |
| 109 | deps = [ |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 110 | "@com_google_absl//absl/log", |
| 111 | "@com_google_absl//absl/log:check", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 112 | "@org_tuxfamily_eigen//:eigen", |
| 113 | ], |
| 114 | ) |
| 115 | |
| 116 | cc_test( |
| 117 | name = "quarternion_utils_test", |
| 118 | srcs = [ |
| 119 | "quaternion_utils_test.cc", |
| 120 | ], |
| 121 | target_compatible_with = ["@platforms//os:linux"], |
| 122 | deps = [ |
milind-u | e53bf55 | 2021-12-11 14:42:00 -0800 | [diff] [blame] | 123 | ":jacobian", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 124 | ":quaternion_utils", |
milind-u | e53bf55 | 2021-12-11 14:42:00 -0800 | [diff] [blame] | 125 | ":runge_kutta", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 126 | "//aos/testing:googletest", |
| 127 | "//aos/testing:random_seed", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 128 | "@com_google_absl//absl/log", |
| 129 | "@com_google_absl//absl/log:check", |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 130 | "@org_tuxfamily_eigen//:eigen", |
| 131 | ], |
| 132 | ) |
| 133 | |
| 134 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 135 | name = "team_number_test_environment", |
| 136 | testonly = True, |
| 137 | srcs = [ |
| 138 | "team_number_test_environment.cc", |
| 139 | ], |
| 140 | hdrs = [ |
| 141 | "team_number_test_environment.h", |
| 142 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 143 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 144 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 145 | "//aos/network:team_number", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 146 | "//aos/testing:googletest", |
| 147 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 148 | ) |
| 149 | |
| 150 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 151 | name = "hybrid_state_feedback_loop_test", |
| 152 | srcs = [ |
| 153 | "hybrid_state_feedback_loop_test.cc", |
| 154 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 155 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 156 | deps = [ |
| 157 | ":hybrid_state_feedback_loop", |
| 158 | "//aos/testing:googletest", |
| 159 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 160 | ) |
| 161 | |
| 162 | cc_library( |
James Kuszmaul | 9f9676d | 2019-01-25 21:27:58 -0800 | [diff] [blame] | 163 | name = "pose", |
| 164 | hdrs = ["pose.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 165 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 9f9676d | 2019-01-25 21:27:58 -0800 | [diff] [blame] | 166 | deps = [ |
| 167 | "//aos/util:math", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 168 | "@org_tuxfamily_eigen//:eigen", |
James Kuszmaul | 9f9676d | 2019-01-25 21:27:58 -0800 | [diff] [blame] | 169 | ], |
| 170 | ) |
| 171 | |
| 172 | cc_test( |
| 173 | name = "pose_test", |
| 174 | srcs = ["pose_test.cc"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 175 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 9f9676d | 2019-01-25 21:27:58 -0800 | [diff] [blame] | 176 | deps = [ |
| 177 | ":pose", |
| 178 | "//aos/testing:googletest", |
| 179 | ], |
| 180 | ) |
| 181 | |
| 182 | cc_library( |
Niko Sohmers | 4a5bef8 | 2023-12-30 15:16:16 -0800 | [diff] [blame] | 183 | name = "encoder_fault_detector", |
| 184 | srcs = ["encoder_fault_detector.cc"], |
| 185 | hdrs = ["encoder_fault_detector.h"], |
| 186 | target_compatible_with = ["@platforms//os:linux"], |
| 187 | deps = [ |
| 188 | ":encoder_fault_status_fbs", |
| 189 | "//aos/containers:sized_array", |
| 190 | "//aos/time", |
| 191 | "//frc971/control_loops:can_talonfx_fbs", |
| 192 | ], |
| 193 | ) |
| 194 | |
| 195 | cc_test( |
| 196 | name = "encoder_fault_detector_test", |
| 197 | srcs = ["encoder_fault_detector_test.cc"], |
| 198 | target_compatible_with = ["@platforms//os:linux"], |
| 199 | deps = [ |
| 200 | ":encoder_fault_detector", |
| 201 | "//aos:json_to_flatbuffer", |
| 202 | "//aos/testing:googletest", |
| 203 | ], |
| 204 | ) |
| 205 | |
| 206 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 207 | name = "hall_effect_tracker", |
| 208 | hdrs = [ |
| 209 | "hall_effect_tracker.h", |
| 210 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 211 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 212 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 213 | ":control_loops_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 214 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 215 | ) |
| 216 | |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 217 | flatbuffer_ts_library( |
| 218 | name = "control_loops_ts_fbs", |
| 219 | srcs = [ |
| 220 | "control_loops.fbs", |
| 221 | ], |
| 222 | ) |
| 223 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 224 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 225 | name = "control_loops_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 226 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 227 | "control_loops.fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 228 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 229 | ) |
| 230 | |
Niko Sohmers | 76f4756 | 2023-12-20 20:59:06 -0800 | [diff] [blame] | 231 | flatbuffer_ts_library( |
Niko Sohmers | 4a5bef8 | 2023-12-30 15:16:16 -0800 | [diff] [blame] | 232 | name = "encoder_fault_status_ts_fbs", |
| 233 | srcs = [ |
| 234 | "encoder_fault_status.fbs", |
| 235 | ], |
| 236 | ) |
| 237 | |
| 238 | static_flatbuffer( |
| 239 | name = "encoder_fault_status_fbs", |
| 240 | srcs = [ |
| 241 | "encoder_fault_status.fbs", |
| 242 | ], |
| 243 | ) |
| 244 | |
| 245 | flatbuffer_ts_library( |
Maxwell Henderson | 10ed5c3 | 2024-01-09 12:40:54 -0800 | [diff] [blame] | 246 | name = "can_talonfx_ts_fbs", |
Niko Sohmers | 76f4756 | 2023-12-20 20:59:06 -0800 | [diff] [blame] | 247 | srcs = [ |
Maxwell Henderson | 10ed5c3 | 2024-01-09 12:40:54 -0800 | [diff] [blame] | 248 | "can_talonfx.fbs", |
Niko Sohmers | 76f4756 | 2023-12-20 20:59:06 -0800 | [diff] [blame] | 249 | ], |
| 250 | ) |
| 251 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 252 | static_flatbuffer( |
Maxwell Henderson | 10ed5c3 | 2024-01-09 12:40:54 -0800 | [diff] [blame] | 253 | name = "can_talonfx_fbs", |
Maxwell Henderson | ca1d18f | 2023-07-26 21:06:14 -0700 | [diff] [blame] | 254 | srcs = [ |
Maxwell Henderson | 10ed5c3 | 2024-01-09 12:40:54 -0800 | [diff] [blame] | 255 | "can_talonfx.fbs", |
Maxwell Henderson | ca1d18f | 2023-07-26 21:06:14 -0700 | [diff] [blame] | 256 | ], |
| 257 | ) |
| 258 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 259 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 260 | name = "position_sensor_sim_test", |
| 261 | srcs = [ |
| 262 | "position_sensor_sim_test.cc", |
| 263 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 264 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 265 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 266 | ":control_loops_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 267 | ":position_sensor_sim", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 268 | "//aos/logging", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 269 | "//aos/testing:googletest", |
| 270 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 271 | ) |
| 272 | |
| 273 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 274 | name = "position_sensor_sim", |
| 275 | testonly = True, |
| 276 | srcs = [ |
| 277 | "position_sensor_sim.cc", |
| 278 | ], |
| 279 | hdrs = [ |
| 280 | "position_sensor_sim.h", |
| 281 | ], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 282 | linkopts = [ |
| 283 | "-lm", |
| 284 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 285 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 286 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 287 | ":control_loops_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 288 | ":gaussian_noise", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 289 | "//aos/testing:random_seed", |
Philipp Schrader | b3a057e | 2018-03-10 18:59:40 -0800 | [diff] [blame] | 290 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 291 | ) |
| 292 | |
| 293 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 294 | name = "gaussian_noise", |
| 295 | srcs = [ |
| 296 | "gaussian_noise.cc", |
| 297 | ], |
| 298 | hdrs = [ |
| 299 | "gaussian_noise.h", |
| 300 | ], |
Philipp Schrader | b3a057e | 2018-03-10 18:59:40 -0800 | [diff] [blame] | 301 | linkopts = [ |
| 302 | "-lm", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 303 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 304 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 305 | ) |
| 306 | |
| 307 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 308 | name = "coerce_goal", |
| 309 | srcs = [ |
| 310 | "coerce_goal.cc", |
| 311 | ], |
| 312 | hdrs = [ |
| 313 | "coerce_goal.h", |
| 314 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 315 | linkopts = select({ |
| 316 | "@platforms//os:linux": ["-lm"], |
| 317 | "//conditions:default": [], |
| 318 | }), |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 319 | deps = [ |
James Kuszmaul | 6175066 | 2021-06-21 21:32:33 -0700 | [diff] [blame] | 320 | "//frc971/control_loops:polytope", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 321 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 322 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 323 | ) |
| 324 | |
Lee Mracek | 6568614 | 2020-01-10 22:21:39 -0500 | [diff] [blame] | 325 | cc_test( |
| 326 | name = "coerce_goal_test", |
| 327 | srcs = [ |
| 328 | "coerce_goal_test.cc", |
| 329 | ], |
| 330 | linkopts = [ |
| 331 | "-lm", |
| 332 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 333 | target_compatible_with = ["@platforms//os:linux"], |
Lee Mracek | 6568614 | 2020-01-10 22:21:39 -0500 | [diff] [blame] | 334 | deps = [ |
| 335 | ":coerce_goal", |
Lee Mracek | 6568614 | 2020-01-10 22:21:39 -0500 | [diff] [blame] | 336 | "//aos/testing:googletest", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 337 | "//frc971/control_loops:polytope", |
Lee Mracek | 6568614 | 2020-01-10 22:21:39 -0500 | [diff] [blame] | 338 | "@org_tuxfamily_eigen//:eigen", |
| 339 | ], |
| 340 | ) |
| 341 | |
Austin Schuh | 4cc4fe2 | 2017-11-23 19:13:09 -0800 | [diff] [blame] | 342 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 343 | name = "state_feedback_loop", |
| 344 | hdrs = [ |
| 345 | "state_feedback_loop.h", |
| 346 | ], |
| 347 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 348 | "//aos:macros", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 349 | "@org_tuxfamily_eigen//:eigen", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 350 | ] + select({ |
| 351 | "@platforms//os:linux": ["//aos/logging"], |
| 352 | "//conditions:default": [], |
| 353 | }), |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 354 | ) |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 355 | |
| 356 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 357 | name = "hybrid_state_feedback_loop", |
| 358 | hdrs = [ |
| 359 | "hybrid_state_feedback_loop.h", |
| 360 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 361 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 362 | deps = [ |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 363 | ":c2d", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 364 | ":state_feedback_loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 365 | "//aos:macros", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 366 | "//aos/logging", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 367 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 368 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 369 | ], |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 370 | ) |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 371 | |
| 372 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 373 | name = "simple_capped_state_feedback_loop", |
| 374 | hdrs = [ |
| 375 | "simple_capped_state_feedback_loop.h", |
| 376 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 377 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 378 | deps = [ |
| 379 | ":state_feedback_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 380 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 381 | ], |
| 382 | ) |
| 383 | |
| 384 | cc_library( |
| 385 | name = "runge_kutta", |
| 386 | hdrs = [ |
| 387 | "runge_kutta.h", |
Austin Schuh | b0bfaf8 | 2024-06-19 19:47:23 -0700 | [diff] [blame] | 388 | "runge_kutta_helpers.h", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 389 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 390 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 391 | deps = [ |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 392 | "@com_google_absl//absl/log", |
| 393 | "@com_google_absl//absl/log:check", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 394 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 395 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 396 | ) |
| 397 | |
| 398 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 399 | name = "runge_kutta_test", |
| 400 | srcs = [ |
| 401 | "runge_kutta_test.cc", |
| 402 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 403 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 404 | deps = [ |
| 405 | ":runge_kutta", |
| 406 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 407 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 408 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 409 | ) |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 410 | |
Austin Schuh | 173a159 | 2018-12-19 16:20:54 +1100 | [diff] [blame] | 411 | cc_library( |
| 412 | name = "fixed_quadrature", |
| 413 | hdrs = [ |
| 414 | "fixed_quadrature.h", |
| 415 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 416 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a935a08 | 2023-02-20 21:45:54 -0800 | [diff] [blame] | 417 | deps = [ |
| 418 | "@org_tuxfamily_eigen//:eigen", |
| 419 | ], |
Austin Schuh | 173a159 | 2018-12-19 16:20:54 +1100 | [diff] [blame] | 420 | ) |
| 421 | |
| 422 | cc_test( |
| 423 | name = "fixed_quadrature_test", |
| 424 | srcs = [ |
| 425 | "fixed_quadrature_test.cc", |
| 426 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 427 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 173a159 | 2018-12-19 16:20:54 +1100 | [diff] [blame] | 428 | deps = [ |
| 429 | ":fixed_quadrature", |
| 430 | "//aos/testing:googletest", |
| 431 | ], |
| 432 | ) |
| 433 | |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 434 | flatbuffer_ts_library( |
| 435 | name = "profiled_subsystem_ts_fbs", |
| 436 | srcs = [ |
| 437 | "profiled_subsystem.fbs", |
| 438 | ], |
| 439 | deps = [ |
| 440 | ":control_loops_ts_fbs", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 441 | ":state_feedback_loop_ts_fbs", |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 442 | ], |
| 443 | ) |
| 444 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 445 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 446 | name = "profiled_subsystem_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 447 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 448 | "profiled_subsystem.fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 449 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 450 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 451 | deps = [ |
| 452 | ":control_loops_fbs", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 453 | ":state_feedback_loop_fbs", |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 454 | ], |
Austin Schuh | 9fe68f7 | 2019-08-10 19:32:03 -0700 | [diff] [blame] | 455 | ) |
| 456 | |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 457 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 458 | name = "profiled_subsystem", |
| 459 | srcs = [ |
| 460 | "profiled_subsystem.cc", |
| 461 | ], |
| 462 | hdrs = [ |
| 463 | "profiled_subsystem.h", |
| 464 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 465 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 466 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 467 | ":control_loops_fbs", |
| 468 | ":profiled_subsystem_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 469 | ":simple_capped_state_feedback_loop", |
| 470 | ":state_feedback_loop", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 471 | ":state_feedback_loop_converters", |
| 472 | "//aos:flatbuffer_merge", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 473 | "//aos/util:trapezoid_profile", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 474 | "//frc971/control_loops:control_loop", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 475 | "//frc971/zeroing", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 476 | "//frc971/zeroing:pot_and_index", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 477 | ], |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 478 | ) |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 479 | |
| 480 | cc_library( |
| 481 | name = "jacobian", |
| 482 | hdrs = [ |
| 483 | "jacobian.h", |
| 484 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 485 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 486 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 487 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 488 | ], |
| 489 | ) |
| 490 | |
| 491 | cc_test( |
| 492 | name = "jacobian_test", |
| 493 | srcs = [ |
| 494 | "jacobian_test.cc", |
| 495 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 496 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 497 | deps = [ |
| 498 | ":jacobian", |
| 499 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 500 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 501 | ], |
| 502 | ) |
| 503 | |
James Kuszmaul | 59a5c61 | 2019-01-22 07:56:08 -0800 | [diff] [blame] | 504 | cc_test( |
| 505 | name = "c2d_test", |
| 506 | srcs = [ |
| 507 | "c2d_test.cc", |
| 508 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 509 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 59a5c61 | 2019-01-22 07:56:08 -0800 | [diff] [blame] | 510 | visibility = ["//visibility:public"], |
| 511 | deps = [ |
| 512 | ":c2d", |
| 513 | ":runge_kutta", |
| 514 | "//aos/testing:googletest", |
| 515 | ], |
| 516 | ) |
| 517 | |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 518 | cc_library( |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 519 | name = "c2d", |
| 520 | hdrs = [ |
| 521 | "c2d.h", |
| 522 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 523 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 524 | visibility = ["//visibility:public"], |
| 525 | deps = [ |
James Kuszmaul | 651fc3f | 2019-05-15 21:14:25 -0700 | [diff] [blame] | 526 | "//aos/time", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 527 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 528 | ], |
| 529 | ) |
| 530 | |
| 531 | cc_library( |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 532 | name = "dlqr", |
| 533 | hdrs = [ |
| 534 | "dlqr.h", |
| 535 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 536 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 537 | visibility = ["//visibility:public"], |
| 538 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 539 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 540 | "@slycot_repo//:slicot", |
| 541 | ], |
| 542 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 543 | |
| 544 | py_library( |
| 545 | name = "python_init", |
| 546 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 547 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 548 | visibility = ["//visibility:public"], |
| 549 | deps = ["//frc971:python_init"], |
| 550 | ) |
Austin Schuh | e6e7ea5 | 2019-01-13 17:26:36 -0800 | [diff] [blame] | 551 | |
| 552 | cc_library( |
| 553 | name = "binomial", |
| 554 | hdrs = ["binomial.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 555 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e6e7ea5 | 2019-01-13 17:26:36 -0800 | [diff] [blame] | 556 | ) |
| 557 | |
| 558 | cc_test( |
| 559 | name = "binomial_test", |
| 560 | srcs = [ |
| 561 | "binomial_test.cc", |
| 562 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 563 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e6e7ea5 | 2019-01-13 17:26:36 -0800 | [diff] [blame] | 564 | deps = [ |
| 565 | ":binomial", |
| 566 | "//aos/testing:googletest", |
| 567 | ], |
| 568 | ) |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 569 | |
| 570 | cc_library( |
| 571 | name = "capped_test_plant", |
| 572 | testonly = True, |
| 573 | srcs = [ |
| 574 | "capped_test_plant.cc", |
| 575 | ], |
| 576 | hdrs = [ |
| 577 | "capped_test_plant.h", |
| 578 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 579 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 580 | deps = [ |
| 581 | ":state_feedback_loop", |
| 582 | "//aos/testing:googletest", |
| 583 | ], |
| 584 | ) |
| 585 | |
| 586 | cc_library( |
| 587 | name = "static_zeroing_single_dof_profiled_subsystem", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 588 | hdrs = [ |
| 589 | "static_zeroing_single_dof_profiled_subsystem.h", |
| 590 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 591 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 592 | deps = [ |
| 593 | "//frc971/control_loops:profiled_subsystem", |
| 594 | ], |
| 595 | ) |
| 596 | |
| 597 | genrule( |
| 598 | name = "genrule_static_zeroing_single_dof_profiled_subsystem_test", |
| 599 | outs = [ |
| 600 | "static_zeroing_single_dof_profiled_subsystem_test_plant.h", |
| 601 | "static_zeroing_single_dof_profiled_subsystem_test_plant.cc", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 602 | "static_zeroing_single_dof_profiled_subsystem_test_plant.json", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 603 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h", |
| 604 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 605 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.json", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 606 | ], |
| 607 | cmd = "$(location //frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test) $(OUTS)", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 608 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 609 | tools = [ |
| 610 | "//frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test", |
| 611 | ], |
| 612 | ) |
| 613 | |
| 614 | cc_library( |
| 615 | name = "static_zeroing_single_dof_profiled_subsystem_test_plants", |
| 616 | srcs = [ |
| 617 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc", |
| 618 | "static_zeroing_single_dof_profiled_subsystem_test_plant.cc", |
| 619 | ], |
| 620 | hdrs = [ |
| 621 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h", |
| 622 | "static_zeroing_single_dof_profiled_subsystem_test_plant.h", |
| 623 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 624 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 625 | deps = [ |
| 626 | ":state_feedback_loop", |
| 627 | ], |
| 628 | ) |
| 629 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 630 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 631 | name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 632 | srcs = [ |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 633 | "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal.fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 634 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 635 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 636 | deps = [ |
| 637 | ":control_loops_fbs", |
| 638 | ":profiled_subsystem_fbs", |
| 639 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 640 | ) |
| 641 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 642 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 643 | name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs", |
| 644 | srcs = [ |
| 645 | "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output.fbs", |
| 646 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 647 | target_compatible_with = ["@platforms//os:linux"], |
| 648 | ) |
| 649 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 650 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 651 | name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs", |
| 652 | srcs = [ |
| 653 | "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position.fbs", |
| 654 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 655 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 656 | deps = [ |
| 657 | ":control_loops_fbs", |
| 658 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 659 | ) |
| 660 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 661 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 662 | name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs", |
| 663 | srcs = [ |
| 664 | "static_zeroing_single_dof_profiled_subsystem_test_absolute_position.fbs", |
| 665 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 666 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 667 | deps = [ |
| 668 | ":control_loops_fbs", |
| 669 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 670 | ) |
| 671 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 672 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 673 | name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs", |
| 674 | srcs = [ |
| 675 | "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status.fbs", |
| 676 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 677 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 678 | deps = [ |
| 679 | ":control_loops_fbs", |
| 680 | ":profiled_subsystem_fbs", |
| 681 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 682 | ) |
| 683 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 684 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 685 | name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs", |
| 686 | srcs = [ |
| 687 | "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status.fbs", |
| 688 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 689 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 690 | deps = [ |
| 691 | ":control_loops_fbs", |
| 692 | ":profiled_subsystem_fbs", |
| 693 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 694 | ) |
| 695 | |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 696 | cc_test( |
| 697 | name = "static_zeroing_single_dof_profiled_subsystem_test", |
| 698 | srcs = [ |
| 699 | "static_zeroing_single_dof_profiled_subsystem_test.cc", |
| 700 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 701 | data = [ |
| 702 | ":static_zeroing_single_dof_profiled_subsystem_test_config", |
| 703 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 704 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 705 | deps = [ |
| 706 | ":capped_test_plant", |
| 707 | ":position_sensor_sim", |
| 708 | ":static_zeroing_single_dof_profiled_subsystem", |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 709 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs", |
| 710 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 711 | ":static_zeroing_single_dof_profiled_subsystem_test_plants", |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 712 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs", |
| 713 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs", |
| 714 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs", |
| 715 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 716 | "//aos/testing:googletest", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 717 | "//frc971/control_loops:control_loop_test", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 718 | "//frc971/zeroing:absolute_and_absolute_encoder", |
| 719 | "//frc971/zeroing:absolute_encoder", |
| 720 | "//frc971/zeroing:pot_and_absolute_encoder", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 721 | ], |
| 722 | ) |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 723 | |
| 724 | aos_config( |
| 725 | name = "static_zeroing_single_dof_profiled_subsystem_test_config", |
| 726 | src = "static_zeroing_single_dof_profiled_subsystem_test_config_source.json", |
| 727 | flatbuffers = [ |
| 728 | "//frc971/input:joystick_state_fbs", |
| 729 | "//frc971/input:robot_state_fbs", |
| 730 | "//aos/logging:log_message_fbs", |
| 731 | "//aos/events:event_loop_fbs", |
| 732 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs", |
| 733 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs", |
| 734 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs", |
| 735 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs", |
| 736 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs", |
| 737 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs", |
| 738 | ], |
| 739 | target_compatible_with = ["@platforms//os:linux"], |
| 740 | ) |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 741 | |
| 742 | static_flatbuffer( |
| 743 | name = "state_feedback_loop_fbs", |
| 744 | srcs = ["state_feedback_loop.fbs"], |
| 745 | deps = ["//frc971/math:matrix_fbs"], |
| 746 | ) |
| 747 | |
| 748 | flatbuffer_ts_library( |
| 749 | name = "state_feedback_loop_ts_fbs", |
| 750 | srcs = ["state_feedback_loop.fbs"], |
| 751 | deps = ["//frc971/math:matrix_ts_fbs"], |
| 752 | ) |
| 753 | |
| 754 | cc_library( |
| 755 | name = "hybrid_state_feedback_loop_converters", |
| 756 | srcs = ["hybrid_state_feedback_loop_converters.h"], |
| 757 | deps = [ |
| 758 | ":hybrid_state_feedback_loop", |
| 759 | ":state_feedback_loop_converters", |
| 760 | ":state_feedback_loop_fbs", |
| 761 | "//frc971/math:flatbuffers_matrix", |
| 762 | ], |
| 763 | ) |
| 764 | |
| 765 | cc_library( |
| 766 | name = "state_feedback_loop_converters", |
| 767 | srcs = ["state_feedback_loop_converters.h"], |
| 768 | deps = [ |
| 769 | ":state_feedback_loop", |
| 770 | ":state_feedback_loop_fbs", |
| 771 | "//frc971/math:flatbuffers_matrix", |
| 772 | ], |
| 773 | ) |