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 | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 3 | load("//aos/build:queues.bzl", "queue_library") |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 4 | load("//tools:environments.bzl", "mcu_cpus") |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 5 | |
| 6 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 7 | name = "team_number_test_environment", |
| 8 | testonly = True, |
| 9 | srcs = [ |
| 10 | "team_number_test_environment.cc", |
| 11 | ], |
| 12 | hdrs = [ |
| 13 | "team_number_test_environment.h", |
| 14 | ], |
| 15 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 16 | "//aos/network:team_number", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 17 | "//aos/testing:googletest", |
| 18 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 19 | ) |
| 20 | |
| 21 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 22 | name = "hybrid_state_feedback_loop_test", |
| 23 | srcs = [ |
| 24 | "hybrid_state_feedback_loop_test.cc", |
| 25 | ], |
| 26 | deps = [ |
| 27 | ":hybrid_state_feedback_loop", |
| 28 | "//aos/testing:googletest", |
| 29 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 30 | ) |
| 31 | |
| 32 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 33 | name = "hall_effect_tracker", |
| 34 | hdrs = [ |
| 35 | "hall_effect_tracker.h", |
| 36 | ], |
| 37 | deps = [ |
| 38 | ":queues", |
| 39 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 40 | ) |
| 41 | |
| 42 | queue_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 43 | name = "queues", |
| 44 | srcs = [ |
| 45 | "control_loops.q", |
| 46 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 47 | ) |
| 48 | |
| 49 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 50 | name = "position_sensor_sim_test", |
| 51 | srcs = [ |
| 52 | "position_sensor_sim_test.cc", |
| 53 | ], |
| 54 | deps = [ |
| 55 | ":position_sensor_sim", |
| 56 | ":queues", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 57 | "//aos/logging", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 58 | "//aos/testing:googletest", |
| 59 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 60 | ) |
| 61 | |
| 62 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 63 | name = "position_sensor_sim", |
| 64 | testonly = True, |
| 65 | srcs = [ |
| 66 | "position_sensor_sim.cc", |
| 67 | ], |
| 68 | hdrs = [ |
| 69 | "position_sensor_sim.h", |
| 70 | ], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 71 | linkopts = [ |
| 72 | "-lm", |
| 73 | ], |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 74 | deps = [ |
| 75 | ":gaussian_noise", |
| 76 | ":queues", |
| 77 | "//aos/testing:random_seed", |
Philipp Schrader | b3a057e | 2018-03-10 18:59:40 -0800 | [diff] [blame] | 78 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 79 | ) |
| 80 | |
| 81 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 82 | name = "gaussian_noise", |
| 83 | srcs = [ |
| 84 | "gaussian_noise.cc", |
| 85 | ], |
| 86 | hdrs = [ |
| 87 | "gaussian_noise.h", |
| 88 | ], |
Philipp Schrader | b3a057e | 2018-03-10 18:59:40 -0800 | [diff] [blame] | 89 | linkopts = [ |
| 90 | "-lm", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 91 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 92 | ) |
| 93 | |
| 94 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 95 | name = "coerce_goal_uc", |
| 96 | srcs = [ |
| 97 | "coerce_goal.cc", |
| 98 | ], |
| 99 | hdrs = [ |
| 100 | "coerce_goal.h", |
| 101 | ], |
| 102 | restricted_to = mcu_cpus, |
| 103 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 104 | "//aos/controls:polytope_uc", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 105 | "//third_party/eigen", |
| 106 | ], |
| 107 | ) |
| 108 | |
| 109 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 110 | name = "coerce_goal", |
| 111 | srcs = [ |
| 112 | "coerce_goal.cc", |
| 113 | ], |
| 114 | hdrs = [ |
| 115 | "coerce_goal.h", |
| 116 | ], |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 117 | linkopts = [ |
| 118 | "-lm", |
| 119 | ], |
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/controls:polytope", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 122 | "//third_party/eigen", |
| 123 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 124 | ) |
| 125 | |
Brian Silverman | 6260c09 | 2018-01-14 15:21:36 -0800 | [diff] [blame] | 126 | # TODO(austin): Select isn't working right. We should be able to remove |
| 127 | # logging conditionally with select and have CPU constraints work correctly. |
| 128 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 129 | name = "state_feedback_loop_uc", |
| 130 | hdrs = [ |
| 131 | "state_feedback_loop.h", |
| 132 | ], |
Brian Silverman | 1613b6e | 2018-09-03 19:10:37 -0700 | [diff] [blame] | 133 | restricted_to = mcu_cpus, |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 134 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 135 | "//aos:macros", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 136 | "//third_party/eigen", |
| 137 | ], |
Austin Schuh | 4cc4fe2 | 2017-11-23 19:13:09 -0800 | [diff] [blame] | 138 | ) |
| 139 | |
| 140 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 141 | name = "state_feedback_loop", |
| 142 | hdrs = [ |
| 143 | "state_feedback_loop.h", |
| 144 | ], |
| 145 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 146 | "//aos:macros", |
| 147 | "//aos/logging", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 148 | "//third_party/eigen", |
| 149 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 150 | ) |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 151 | |
| 152 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 153 | name = "hybrid_state_feedback_loop", |
| 154 | hdrs = [ |
| 155 | "hybrid_state_feedback_loop.h", |
| 156 | ], |
| 157 | deps = [ |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 158 | ":c2d", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 159 | ":state_feedback_loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 160 | "//aos:macros", |
| 161 | "//aos/controls:control_loop", |
| 162 | "//aos/logging", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 163 | "//third_party/eigen", |
| 164 | ], |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 165 | ) |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 166 | |
| 167 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 168 | name = "simple_capped_state_feedback_loop", |
| 169 | hdrs = [ |
| 170 | "simple_capped_state_feedback_loop.h", |
| 171 | ], |
| 172 | deps = [ |
| 173 | ":state_feedback_loop", |
| 174 | "//third_party/eigen", |
| 175 | ], |
| 176 | ) |
| 177 | |
| 178 | cc_library( |
| 179 | name = "runge_kutta", |
| 180 | hdrs = [ |
| 181 | "runge_kutta.h", |
| 182 | ], |
| 183 | deps = [ |
| 184 | "//third_party/eigen", |
| 185 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 186 | ) |
| 187 | |
| 188 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 189 | name = "runge_kutta_test", |
| 190 | srcs = [ |
| 191 | "runge_kutta_test.cc", |
| 192 | ], |
| 193 | deps = [ |
| 194 | ":runge_kutta", |
| 195 | "//aos/testing:googletest", |
| 196 | "//third_party/eigen", |
| 197 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 198 | ) |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 199 | |
Austin Schuh | 173a159 | 2018-12-19 16:20:54 +1100 | [diff] [blame] | 200 | cc_library( |
| 201 | name = "fixed_quadrature", |
| 202 | hdrs = [ |
| 203 | "fixed_quadrature.h", |
| 204 | ], |
| 205 | ) |
| 206 | |
| 207 | cc_test( |
| 208 | name = "fixed_quadrature_test", |
| 209 | srcs = [ |
| 210 | "fixed_quadrature_test.cc", |
| 211 | ], |
| 212 | deps = [ |
| 213 | ":fixed_quadrature", |
| 214 | "//aos/testing:googletest", |
| 215 | ], |
| 216 | ) |
| 217 | |
Austin Schuh | 3634ed3 | 2017-02-05 16:28:49 -0800 | [diff] [blame] | 218 | queue_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 219 | name = "profiled_subsystem_queue", |
| 220 | srcs = [ |
| 221 | "profiled_subsystem.q", |
| 222 | ], |
| 223 | deps = [ |
| 224 | ":queues", |
| 225 | ], |
Austin Schuh | 3634ed3 | 2017-02-05 16:28:49 -0800 | [diff] [blame] | 226 | ) |
| 227 | |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 228 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 229 | name = "profiled_subsystem", |
| 230 | srcs = [ |
| 231 | "profiled_subsystem.cc", |
| 232 | ], |
| 233 | hdrs = [ |
| 234 | "profiled_subsystem.h", |
| 235 | ], |
| 236 | deps = [ |
| 237 | ":profiled_subsystem_queue", |
| 238 | ":simple_capped_state_feedback_loop", |
| 239 | ":state_feedback_loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 240 | "//aos/controls:control_loop", |
| 241 | "//aos/util:trapezoid_profile", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 242 | "//frc971/zeroing", |
| 243 | ], |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 244 | ) |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 245 | |
| 246 | cc_library( |
| 247 | name = "jacobian", |
| 248 | hdrs = [ |
| 249 | "jacobian.h", |
| 250 | ], |
| 251 | deps = [ |
| 252 | "//third_party/eigen", |
| 253 | ], |
| 254 | ) |
| 255 | |
| 256 | cc_test( |
| 257 | name = "jacobian_test", |
| 258 | srcs = [ |
| 259 | "jacobian_test.cc", |
| 260 | ], |
| 261 | deps = [ |
| 262 | ":jacobian", |
| 263 | "//aos/testing:googletest", |
| 264 | "//third_party/eigen", |
| 265 | ], |
| 266 | ) |
| 267 | |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 268 | cc_library( |
Austin Schuh | 9b881ae | 2019-01-04 07:29:20 +1100 | [diff] [blame] | 269 | name = "c2d", |
| 270 | hdrs = [ |
| 271 | "c2d.h", |
| 272 | ], |
| 273 | visibility = ["//visibility:public"], |
| 274 | deps = [ |
| 275 | "//third_party/eigen", |
| 276 | ], |
| 277 | ) |
| 278 | |
| 279 | cc_library( |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 280 | name = "dlqr", |
| 281 | hdrs = [ |
| 282 | "dlqr.h", |
| 283 | ], |
| 284 | visibility = ["//visibility:public"], |
| 285 | deps = [ |
| 286 | "//third_party/eigen", |
| 287 | "@slycot_repo//:slicot", |
| 288 | ], |
| 289 | ) |
Brian Silverman | 6470f44 | 2018-08-05 12:08:16 -0700 | [diff] [blame] | 290 | |
| 291 | py_library( |
| 292 | name = "python_init", |
| 293 | srcs = ["__init__.py"], |
| 294 | visibility = ["//visibility:public"], |
| 295 | deps = ["//frc971:python_init"], |
| 296 | ) |
Austin Schuh | e6e7ea5 | 2019-01-13 17:26:36 -0800 | [diff] [blame^] | 297 | |
| 298 | cc_library( |
| 299 | name = "binomial", |
| 300 | hdrs = ["binomial.h"], |
| 301 | ) |
| 302 | |
| 303 | cc_test( |
| 304 | name = "binomial_test", |
| 305 | srcs = [ |
| 306 | "binomial_test.cc", |
| 307 | ], |
| 308 | deps = [ |
| 309 | ":binomial", |
| 310 | "//aos/testing:googletest", |
| 311 | ], |
| 312 | ) |