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