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