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", |
James Kuszmaul | 9ea3ff9 | 2024-06-14 15:02:15 -0700 | [diff] [blame] | 349 | "//frc971/zeroing:wrap", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 350 | "@org_tuxfamily_eigen//:eigen", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 351 | ] + select({ |
| 352 | "@platforms//os:linux": ["//aos/logging"], |
| 353 | "//conditions:default": [], |
| 354 | }), |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 355 | ) |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 356 | |
| 357 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 358 | name = "hybrid_state_feedback_loop", |
| 359 | hdrs = [ |
| 360 | "hybrid_state_feedback_loop.h", |
| 361 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 362 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 363 | deps = [ |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 364 | ":c2d", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 365 | ":state_feedback_loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 366 | "//aos:macros", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 367 | "//aos/logging", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 368 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 369 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 370 | ], |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 371 | ) |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 372 | |
| 373 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 374 | name = "simple_capped_state_feedback_loop", |
| 375 | hdrs = [ |
| 376 | "simple_capped_state_feedback_loop.h", |
| 377 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 378 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 379 | deps = [ |
| 380 | ":state_feedback_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 381 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 382 | ], |
| 383 | ) |
| 384 | |
| 385 | cc_library( |
| 386 | name = "runge_kutta", |
| 387 | hdrs = [ |
| 388 | "runge_kutta.h", |
Austin Schuh | b0bfaf8 | 2024-06-19 19:47:23 -0700 | [diff] [blame] | 389 | "runge_kutta_helpers.h", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 390 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 391 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 392 | deps = [ |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 393 | "@com_google_absl//absl/log", |
| 394 | "@com_google_absl//absl/log:check", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 395 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 396 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 397 | ) |
| 398 | |
| 399 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 400 | name = "runge_kutta_test", |
| 401 | srcs = [ |
| 402 | "runge_kutta_test.cc", |
| 403 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 404 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 405 | deps = [ |
| 406 | ":runge_kutta", |
| 407 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 408 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 409 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 410 | ) |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 411 | |
Austin Schuh | 173a159 | 2018-12-19 16:20:54 +1100 | [diff] [blame] | 412 | cc_library( |
| 413 | name = "fixed_quadrature", |
| 414 | hdrs = [ |
| 415 | "fixed_quadrature.h", |
| 416 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 417 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a935a08 | 2023-02-20 21:45:54 -0800 | [diff] [blame] | 418 | deps = [ |
| 419 | "@org_tuxfamily_eigen//:eigen", |
| 420 | ], |
Austin Schuh | 173a159 | 2018-12-19 16:20:54 +1100 | [diff] [blame] | 421 | ) |
| 422 | |
| 423 | cc_test( |
| 424 | name = "fixed_quadrature_test", |
| 425 | srcs = [ |
| 426 | "fixed_quadrature_test.cc", |
| 427 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 428 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 173a159 | 2018-12-19 16:20:54 +1100 | [diff] [blame] | 429 | deps = [ |
| 430 | ":fixed_quadrature", |
| 431 | "//aos/testing:googletest", |
| 432 | ], |
| 433 | ) |
| 434 | |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 435 | flatbuffer_ts_library( |
| 436 | name = "profiled_subsystem_ts_fbs", |
| 437 | srcs = [ |
| 438 | "profiled_subsystem.fbs", |
| 439 | ], |
| 440 | deps = [ |
| 441 | ":control_loops_ts_fbs", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 442 | ":state_feedback_loop_ts_fbs", |
James Kuszmaul | dac091f | 2022-03-22 09:35:06 -0700 | [diff] [blame] | 443 | ], |
| 444 | ) |
| 445 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 446 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 447 | name = "profiled_subsystem_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 448 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 449 | "profiled_subsystem.fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 450 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 451 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 452 | deps = [ |
| 453 | ":control_loops_fbs", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 454 | ":state_feedback_loop_fbs", |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 455 | ], |
Austin Schuh | 9fe68f7 | 2019-08-10 19:32:03 -0700 | [diff] [blame] | 456 | ) |
| 457 | |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 458 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 459 | name = "profiled_subsystem", |
| 460 | srcs = [ |
| 461 | "profiled_subsystem.cc", |
| 462 | ], |
| 463 | hdrs = [ |
| 464 | "profiled_subsystem.h", |
| 465 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 466 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 467 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 468 | ":control_loops_fbs", |
| 469 | ":profiled_subsystem_fbs", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 470 | ":simple_capped_state_feedback_loop", |
| 471 | ":state_feedback_loop", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 472 | ":state_feedback_loop_converters", |
| 473 | "//aos:flatbuffer_merge", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 474 | "//aos/util:trapezoid_profile", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 475 | "//frc971/control_loops:control_loop", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 476 | "//frc971/zeroing", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 477 | "//frc971/zeroing:pot_and_index", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 478 | ], |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 479 | ) |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 480 | |
| 481 | cc_library( |
| 482 | name = "jacobian", |
| 483 | hdrs = [ |
| 484 | "jacobian.h", |
| 485 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 486 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 487 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 488 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 489 | ], |
| 490 | ) |
| 491 | |
| 492 | cc_test( |
| 493 | name = "jacobian_test", |
| 494 | srcs = [ |
| 495 | "jacobian_test.cc", |
| 496 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 497 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 498 | deps = [ |
| 499 | ":jacobian", |
| 500 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 501 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 502 | ], |
| 503 | ) |
| 504 | |
James Kuszmaul | 59a5c61 | 2019-01-22 07:56:08 -0800 | [diff] [blame] | 505 | cc_test( |
| 506 | name = "c2d_test", |
| 507 | srcs = [ |
| 508 | "c2d_test.cc", |
| 509 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 510 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 59a5c61 | 2019-01-22 07:56:08 -0800 | [diff] [blame] | 511 | visibility = ["//visibility:public"], |
| 512 | deps = [ |
| 513 | ":c2d", |
| 514 | ":runge_kutta", |
| 515 | "//aos/testing:googletest", |
| 516 | ], |
| 517 | ) |
| 518 | |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 519 | cc_library( |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 520 | name = "c2d", |
| 521 | hdrs = [ |
| 522 | "c2d.h", |
| 523 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 524 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 525 | visibility = ["//visibility:public"], |
| 526 | deps = [ |
James Kuszmaul | 651fc3f | 2019-05-15 21:14:25 -0700 | [diff] [blame] | 527 | "//aos/time", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 528 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 529 | ], |
| 530 | ) |
| 531 | |
| 532 | cc_library( |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 533 | name = "dlqr", |
| 534 | hdrs = [ |
| 535 | "dlqr.h", |
| 536 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 537 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 538 | visibility = ["//visibility:public"], |
| 539 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 540 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 541 | "@slycot_repo//:slicot", |
| 542 | ], |
| 543 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 544 | |
| 545 | py_library( |
| 546 | name = "python_init", |
| 547 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 548 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 549 | visibility = ["//visibility:public"], |
| 550 | deps = ["//frc971:python_init"], |
| 551 | ) |
Austin Schuh | e6e7ea5 | 2019-01-13 17:26:36 -0800 | [diff] [blame] | 552 | |
| 553 | cc_library( |
| 554 | name = "binomial", |
| 555 | hdrs = ["binomial.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 556 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e6e7ea5 | 2019-01-13 17:26:36 -0800 | [diff] [blame] | 557 | ) |
| 558 | |
| 559 | cc_test( |
| 560 | name = "binomial_test", |
| 561 | srcs = [ |
| 562 | "binomial_test.cc", |
| 563 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 564 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e6e7ea5 | 2019-01-13 17:26:36 -0800 | [diff] [blame] | 565 | deps = [ |
| 566 | ":binomial", |
| 567 | "//aos/testing:googletest", |
| 568 | ], |
| 569 | ) |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 570 | |
| 571 | cc_library( |
| 572 | name = "capped_test_plant", |
| 573 | testonly = True, |
| 574 | srcs = [ |
| 575 | "capped_test_plant.cc", |
| 576 | ], |
| 577 | hdrs = [ |
| 578 | "capped_test_plant.h", |
| 579 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 580 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 581 | deps = [ |
| 582 | ":state_feedback_loop", |
| 583 | "//aos/testing:googletest", |
| 584 | ], |
| 585 | ) |
| 586 | |
| 587 | cc_library( |
| 588 | name = "static_zeroing_single_dof_profiled_subsystem", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 589 | hdrs = [ |
| 590 | "static_zeroing_single_dof_profiled_subsystem.h", |
| 591 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 592 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 593 | deps = [ |
| 594 | "//frc971/control_loops:profiled_subsystem", |
| 595 | ], |
| 596 | ) |
| 597 | |
| 598 | genrule( |
| 599 | name = "genrule_static_zeroing_single_dof_profiled_subsystem_test", |
| 600 | outs = [ |
| 601 | "static_zeroing_single_dof_profiled_subsystem_test_plant.h", |
| 602 | "static_zeroing_single_dof_profiled_subsystem_test_plant.cc", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 603 | "static_zeroing_single_dof_profiled_subsystem_test_plant.json", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 604 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h", |
| 605 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc", |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 606 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.json", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 607 | ], |
| 608 | 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] | 609 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 610 | tools = [ |
| 611 | "//frc971/control_loops/python:static_zeroing_single_dof_profiled_subsystem_test", |
| 612 | ], |
| 613 | ) |
| 614 | |
James Kuszmaul | 9ea3ff9 | 2024-06-14 15:02:15 -0700 | [diff] [blame] | 615 | genrule( |
| 616 | name = "genrule_wrapped_subsystem_test", |
| 617 | outs = [ |
| 618 | "wrapped_subsystem_test_plant.h", |
| 619 | "wrapped_subsystem_test_plant.cc", |
| 620 | "wrapped_subsystem_test_plant.json", |
| 621 | "wrapped_subsystem_test_integral_plant.h", |
| 622 | "wrapped_subsystem_test_integral_plant.cc", |
| 623 | "wrapped_subsystem_test_integral_plant.json", |
| 624 | ], |
| 625 | cmd = "$(location //frc971/control_loops/python:wrapped_subsystem_test) $(OUTS)", |
| 626 | target_compatible_with = ["@platforms//os:linux"], |
| 627 | tools = [ |
| 628 | "//frc971/control_loops/python:wrapped_subsystem_test", |
| 629 | ], |
| 630 | ) |
| 631 | |
| 632 | cc_library( |
| 633 | name = "wrapped_subsystem_test_plants", |
| 634 | srcs = [ |
| 635 | "wrapped_subsystem_test_integral_plant.cc", |
| 636 | "wrapped_subsystem_test_plant.cc", |
| 637 | ], |
| 638 | hdrs = [ |
| 639 | "wrapped_subsystem_test_integral_plant.h", |
| 640 | "wrapped_subsystem_test_plant.h", |
| 641 | ], |
| 642 | target_compatible_with = ["@platforms//os:linux"], |
| 643 | deps = [ |
| 644 | ":state_feedback_loop", |
| 645 | ], |
| 646 | ) |
| 647 | |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 648 | cc_library( |
| 649 | name = "static_zeroing_single_dof_profiled_subsystem_test_plants", |
| 650 | srcs = [ |
| 651 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.cc", |
| 652 | "static_zeroing_single_dof_profiled_subsystem_test_plant.cc", |
| 653 | ], |
| 654 | hdrs = [ |
| 655 | "static_zeroing_single_dof_profiled_subsystem_test_integral_plant.h", |
| 656 | "static_zeroing_single_dof_profiled_subsystem_test_plant.h", |
| 657 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 658 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 659 | deps = [ |
| 660 | ":state_feedback_loop", |
| 661 | ], |
| 662 | ) |
| 663 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 664 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 665 | name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 666 | srcs = [ |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 667 | "static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal.fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 668 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 669 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 670 | deps = [ |
| 671 | ":control_loops_fbs", |
| 672 | ":profiled_subsystem_fbs", |
| 673 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 674 | ) |
| 675 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 676 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 677 | name = "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs", |
| 678 | srcs = [ |
| 679 | "static_zeroing_single_dof_profiled_subsystem_test_subsystem_output.fbs", |
| 680 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 681 | target_compatible_with = ["@platforms//os:linux"], |
| 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_pot_and_absolute_position_fbs", |
| 686 | srcs = [ |
| 687 | "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position.fbs", |
| 688 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [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 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 693 | ) |
| 694 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 695 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 696 | name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs", |
| 697 | srcs = [ |
| 698 | "static_zeroing_single_dof_profiled_subsystem_test_absolute_position.fbs", |
| 699 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 700 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 701 | deps = [ |
| 702 | ":control_loops_fbs", |
| 703 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 704 | ) |
| 705 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 706 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 707 | name = "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs", |
| 708 | srcs = [ |
| 709 | "static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status.fbs", |
| 710 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 711 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 712 | deps = [ |
| 713 | ":control_loops_fbs", |
| 714 | ":profiled_subsystem_fbs", |
| 715 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 716 | ) |
| 717 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 718 | static_flatbuffer( |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 719 | name = "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs", |
| 720 | srcs = [ |
| 721 | "static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status.fbs", |
| 722 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 723 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 724 | deps = [ |
| 725 | ":control_loops_fbs", |
| 726 | ":profiled_subsystem_fbs", |
| 727 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 728 | ) |
| 729 | |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 730 | cc_test( |
| 731 | name = "static_zeroing_single_dof_profiled_subsystem_test", |
| 732 | srcs = [ |
| 733 | "static_zeroing_single_dof_profiled_subsystem_test.cc", |
| 734 | ], |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 735 | data = [ |
| 736 | ":static_zeroing_single_dof_profiled_subsystem_test_config", |
| 737 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 738 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 739 | deps = [ |
| 740 | ":capped_test_plant", |
| 741 | ":position_sensor_sim", |
| 742 | ":static_zeroing_single_dof_profiled_subsystem", |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 743 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs", |
| 744 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 745 | ":static_zeroing_single_dof_profiled_subsystem_test_plants", |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 746 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs", |
| 747 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs", |
| 748 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs", |
| 749 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs", |
James Kuszmaul | 9ea3ff9 | 2024-06-14 15:02:15 -0700 | [diff] [blame] | 750 | ":wrapped_subsystem_test_plants", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 751 | "//aos/testing:googletest", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 752 | "//frc971/control_loops:control_loop_test", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 753 | "//frc971/zeroing:absolute_and_absolute_encoder", |
| 754 | "//frc971/zeroing:absolute_encoder", |
James Kuszmaul | 9ea3ff9 | 2024-06-14 15:02:15 -0700 | [diff] [blame] | 755 | "//frc971/zeroing:continuous_absolute_encoder", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 756 | "//frc971/zeroing:pot_and_absolute_encoder", |
Tyler Chatow | 1258156 | 2019-01-26 20:42:42 -0800 | [diff] [blame] | 757 | ], |
| 758 | ) |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 759 | |
| 760 | aos_config( |
| 761 | name = "static_zeroing_single_dof_profiled_subsystem_test_config", |
| 762 | src = "static_zeroing_single_dof_profiled_subsystem_test_config_source.json", |
| 763 | flatbuffers = [ |
| 764 | "//frc971/input:joystick_state_fbs", |
| 765 | "//frc971/input:robot_state_fbs", |
| 766 | "//aos/logging:log_message_fbs", |
| 767 | "//aos/events:event_loop_fbs", |
| 768 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_output_fbs", |
| 769 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_encoder_status_fbs", |
| 770 | ":static_zeroing_single_dof_profiled_subsystem_test_subsystem_goal_fbs", |
| 771 | ":static_zeroing_single_dof_profiled_subsystem_test_absolute_position_fbs", |
| 772 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_encoder_status_fbs", |
| 773 | ":static_zeroing_single_dof_profiled_subsystem_test_pot_and_absolute_position_fbs", |
| 774 | ], |
| 775 | target_compatible_with = ["@platforms//os:linux"], |
| 776 | ) |
James Kuszmaul | eeb98e9 | 2024-01-14 22:15:32 -0800 | [diff] [blame] | 777 | |
| 778 | static_flatbuffer( |
| 779 | name = "state_feedback_loop_fbs", |
| 780 | srcs = ["state_feedback_loop.fbs"], |
| 781 | deps = ["//frc971/math:matrix_fbs"], |
| 782 | ) |
| 783 | |
| 784 | flatbuffer_ts_library( |
| 785 | name = "state_feedback_loop_ts_fbs", |
| 786 | srcs = ["state_feedback_loop.fbs"], |
| 787 | deps = ["//frc971/math:matrix_ts_fbs"], |
| 788 | ) |
| 789 | |
| 790 | cc_library( |
| 791 | name = "hybrid_state_feedback_loop_converters", |
| 792 | srcs = ["hybrid_state_feedback_loop_converters.h"], |
| 793 | deps = [ |
| 794 | ":hybrid_state_feedback_loop", |
| 795 | ":state_feedback_loop_converters", |
| 796 | ":state_feedback_loop_fbs", |
| 797 | "//frc971/math:flatbuffers_matrix", |
| 798 | ], |
| 799 | ) |
| 800 | |
| 801 | cc_library( |
| 802 | name = "state_feedback_loop_converters", |
| 803 | srcs = ["state_feedback_loop_converters.h"], |
| 804 | deps = [ |
| 805 | ":state_feedback_loop", |
| 806 | ":state_feedback_loop_fbs", |
| 807 | "//frc971/math:flatbuffers_matrix", |
| 808 | ], |
| 809 | ) |