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 = [ |
| 16 | "//aos/common/network:team_number", |
| 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", |
| 57 | "//aos/common/logging", |
| 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 | ], |
| 71 | deps = [ |
| 72 | ":gaussian_noise", |
| 73 | ":queues", |
| 74 | "//aos/testing:random_seed", |
Philipp Schrader | b3a057e | 2018-03-10 18:59:40 -0800 | [diff] [blame^] | 75 | ], |
| 76 | linkopts = [ |
| 77 | "-lm", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -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 = [ |
| 104 | "//aos/common/controls:polytope_uc", |
| 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 | ], |
| 117 | deps = [ |
| 118 | "//aos/common/controls:polytope", |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 119 | "//third_party/eigen", |
| 120 | ], |
Philipp Schrader | b3a057e | 2018-03-10 18:59:40 -0800 | [diff] [blame^] | 121 | linkopts = [ |
| 122 | "-lm", |
| 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 | ], |
| 133 | restricted_to = ["//tools:cortex-m4f"], |
| 134 | deps = [ |
| 135 | "//aos/common:macros", |
| 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 = [ |
| 146 | "//aos/common:macros", |
| 147 | "//aos/common/logging", |
| 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 = [ |
| 158 | ":state_feedback_loop", |
| 159 | "//aos/common:macros", |
| 160 | "//aos/common/controls:control_loop", |
| 161 | "//aos/common/logging", |
| 162 | "//third_party/eigen", |
| 163 | ], |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 164 | ) |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 165 | |
| 166 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 167 | name = "simple_capped_state_feedback_loop", |
| 168 | hdrs = [ |
| 169 | "simple_capped_state_feedback_loop.h", |
| 170 | ], |
| 171 | deps = [ |
| 172 | ":state_feedback_loop", |
| 173 | "//third_party/eigen", |
| 174 | ], |
| 175 | ) |
| 176 | |
| 177 | cc_library( |
| 178 | name = "runge_kutta", |
| 179 | hdrs = [ |
| 180 | "runge_kutta.h", |
| 181 | ], |
| 182 | deps = [ |
| 183 | "//third_party/eigen", |
| 184 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 185 | ) |
| 186 | |
| 187 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 188 | name = "runge_kutta_test", |
| 189 | srcs = [ |
| 190 | "runge_kutta_test.cc", |
| 191 | ], |
| 192 | deps = [ |
| 193 | ":runge_kutta", |
| 194 | "//aos/testing:googletest", |
| 195 | "//third_party/eigen", |
| 196 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 197 | ) |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 198 | |
Austin Schuh | 3634ed3 | 2017-02-05 16:28:49 -0800 | [diff] [blame] | 199 | queue_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 200 | name = "profiled_subsystem_queue", |
| 201 | srcs = [ |
| 202 | "profiled_subsystem.q", |
| 203 | ], |
| 204 | deps = [ |
| 205 | ":queues", |
| 206 | ], |
Austin Schuh | 3634ed3 | 2017-02-05 16:28:49 -0800 | [diff] [blame] | 207 | ) |
| 208 | |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 209 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 210 | name = "profiled_subsystem", |
| 211 | srcs = [ |
| 212 | "profiled_subsystem.cc", |
| 213 | ], |
| 214 | hdrs = [ |
| 215 | "profiled_subsystem.h", |
| 216 | ], |
| 217 | deps = [ |
| 218 | ":profiled_subsystem_queue", |
| 219 | ":simple_capped_state_feedback_loop", |
| 220 | ":state_feedback_loop", |
| 221 | "//aos/common/controls:control_loop", |
| 222 | "//aos/common/util:trapezoid_profile", |
| 223 | "//frc971/zeroing", |
| 224 | ], |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 225 | ) |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 226 | |
| 227 | cc_library( |
| 228 | name = "jacobian", |
| 229 | hdrs = [ |
| 230 | "jacobian.h", |
| 231 | ], |
| 232 | deps = [ |
| 233 | "//third_party/eigen", |
| 234 | ], |
| 235 | ) |
| 236 | |
| 237 | cc_test( |
| 238 | name = "jacobian_test", |
| 239 | srcs = [ |
| 240 | "jacobian_test.cc", |
| 241 | ], |
| 242 | deps = [ |
| 243 | ":jacobian", |
| 244 | "//aos/testing:googletest", |
| 245 | "//third_party/eigen", |
| 246 | ], |
| 247 | ) |
| 248 | |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 249 | cc_library( |
| 250 | name = "dlqr", |
| 251 | hdrs = [ |
| 252 | "dlqr.h", |
| 253 | ], |
| 254 | visibility = ["//visibility:public"], |
| 255 | deps = [ |
| 256 | "//third_party/eigen", |
| 257 | "@slycot_repo//:slicot", |
| 258 | ], |
| 259 | ) |