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