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