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", |
| 75 | "//debian:libm", |
| 76 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 77 | ) |
| 78 | |
| 79 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 80 | name = "gaussian_noise", |
| 81 | srcs = [ |
| 82 | "gaussian_noise.cc", |
| 83 | ], |
| 84 | hdrs = [ |
| 85 | "gaussian_noise.h", |
| 86 | ], |
| 87 | deps = [ |
| 88 | "//debian:libm", |
| 89 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 90 | ) |
| 91 | |
| 92 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 93 | name = "coerce_goal_uc", |
| 94 | srcs = [ |
| 95 | "coerce_goal.cc", |
| 96 | ], |
| 97 | hdrs = [ |
| 98 | "coerce_goal.h", |
| 99 | ], |
| 100 | restricted_to = mcu_cpus, |
| 101 | deps = [ |
| 102 | "//aos/common/controls:polytope_uc", |
| 103 | "//third_party/eigen", |
| 104 | ], |
| 105 | ) |
| 106 | |
| 107 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 108 | name = "coerce_goal", |
| 109 | srcs = [ |
| 110 | "coerce_goal.cc", |
| 111 | ], |
| 112 | hdrs = [ |
| 113 | "coerce_goal.h", |
| 114 | ], |
| 115 | deps = [ |
| 116 | "//aos/common/controls:polytope", |
| 117 | "//debian:libm", |
| 118 | "//third_party/eigen", |
| 119 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 120 | ) |
| 121 | |
Brian Silverman | 6260c09 | 2018-01-14 15:21:36 -0800 | [diff] [blame] | 122 | # TODO(austin): Select isn't working right. We should be able to remove |
| 123 | # logging conditionally with select and have CPU constraints work correctly. |
| 124 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 125 | name = "state_feedback_loop_uc", |
| 126 | hdrs = [ |
| 127 | "state_feedback_loop.h", |
| 128 | ], |
| 129 | restricted_to = ["//tools:cortex-m4f"], |
| 130 | deps = [ |
| 131 | "//aos/common:macros", |
| 132 | "//third_party/eigen", |
| 133 | ], |
Austin Schuh | 4cc4fe2 | 2017-11-23 19:13:09 -0800 | [diff] [blame] | 134 | ) |
| 135 | |
| 136 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 137 | name = "state_feedback_loop", |
| 138 | hdrs = [ |
| 139 | "state_feedback_loop.h", |
| 140 | ], |
| 141 | deps = [ |
| 142 | "//aos/common:macros", |
| 143 | "//aos/common/logging", |
| 144 | "//third_party/eigen", |
| 145 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 146 | ) |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 147 | |
| 148 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 149 | name = "hybrid_state_feedback_loop", |
| 150 | hdrs = [ |
| 151 | "hybrid_state_feedback_loop.h", |
| 152 | ], |
| 153 | deps = [ |
| 154 | ":state_feedback_loop", |
| 155 | "//aos/common:macros", |
| 156 | "//aos/common/controls:control_loop", |
| 157 | "//aos/common/logging", |
| 158 | "//third_party/eigen", |
| 159 | ], |
Brian Silverman | 2b1957a | 2016-02-14 20:29:57 -0500 | [diff] [blame] | 160 | ) |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 161 | |
| 162 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 163 | name = "simple_capped_state_feedback_loop", |
| 164 | hdrs = [ |
| 165 | "simple_capped_state_feedback_loop.h", |
| 166 | ], |
| 167 | deps = [ |
| 168 | ":state_feedback_loop", |
| 169 | "//third_party/eigen", |
| 170 | ], |
| 171 | ) |
| 172 | |
| 173 | cc_library( |
| 174 | name = "runge_kutta", |
| 175 | hdrs = [ |
| 176 | "runge_kutta.h", |
| 177 | ], |
| 178 | deps = [ |
| 179 | "//third_party/eigen", |
| 180 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 181 | ) |
| 182 | |
| 183 | cc_test( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 184 | name = "runge_kutta_test", |
| 185 | srcs = [ |
| 186 | "runge_kutta_test.cc", |
| 187 | ], |
| 188 | deps = [ |
| 189 | ":runge_kutta", |
| 190 | "//aos/testing:googletest", |
| 191 | "//third_party/eigen", |
| 192 | ], |
Austin Schuh | acd335a | 2017-01-01 16:20:54 -0800 | [diff] [blame] | 193 | ) |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 194 | |
Austin Schuh | 3634ed3 | 2017-02-05 16:28:49 -0800 | [diff] [blame] | 195 | queue_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 196 | name = "profiled_subsystem_queue", |
| 197 | srcs = [ |
| 198 | "profiled_subsystem.q", |
| 199 | ], |
| 200 | deps = [ |
| 201 | ":queues", |
| 202 | ], |
Austin Schuh | 3634ed3 | 2017-02-05 16:28:49 -0800 | [diff] [blame] | 203 | ) |
| 204 | |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 205 | cc_library( |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 206 | name = "profiled_subsystem", |
| 207 | srcs = [ |
| 208 | "profiled_subsystem.cc", |
| 209 | ], |
| 210 | hdrs = [ |
| 211 | "profiled_subsystem.h", |
| 212 | ], |
| 213 | deps = [ |
| 214 | ":profiled_subsystem_queue", |
| 215 | ":simple_capped_state_feedback_loop", |
| 216 | ":state_feedback_loop", |
| 217 | "//aos/common/controls:control_loop", |
| 218 | "//aos/common/util:trapezoid_profile", |
| 219 | "//frc971/zeroing", |
| 220 | ], |
Austin Schuh | 473a565 | 2017-02-05 01:30:42 -0800 | [diff] [blame] | 221 | ) |
Austin Schuh | a647d60 | 2018-02-18 14:05:15 -0800 | [diff] [blame] | 222 | |
| 223 | cc_library( |
| 224 | name = "jacobian", |
| 225 | hdrs = [ |
| 226 | "jacobian.h", |
| 227 | ], |
| 228 | deps = [ |
| 229 | "//third_party/eigen", |
| 230 | ], |
| 231 | ) |
| 232 | |
| 233 | cc_test( |
| 234 | name = "jacobian_test", |
| 235 | srcs = [ |
| 236 | "jacobian_test.cc", |
| 237 | ], |
| 238 | deps = [ |
| 239 | ":jacobian", |
| 240 | "//aos/testing:googletest", |
| 241 | "//third_party/eigen", |
| 242 | ], |
| 243 | ) |
| 244 | |
Austin Schuh | 0378513 | 2018-02-19 18:29:06 -0800 | [diff] [blame] | 245 | cc_library( |
| 246 | name = "dlqr", |
| 247 | hdrs = [ |
| 248 | "dlqr.h", |
| 249 | ], |
| 250 | visibility = ["//visibility:public"], |
| 251 | deps = [ |
| 252 | "//third_party/eigen", |
| 253 | "@slycot_repo//:slicot", |
| 254 | ], |
| 255 | ) |