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