blob: 3cc8dd3d81e4cd14c0a72697439bbdc344559163 [file] [log] [blame]
Austin Schuha647d602018-02-18 14:05:15 -08001package(default_visibility = ["//visibility:public"])
Brian Silverman100534c2015-09-07 15:51:23 -04002
Austin Schuha647d602018-02-18 14:05:15 -08003load("//aos/build:queues.bzl", "queue_library")
Austin Schuhbcce26a2018-03-26 23:41:24 -07004load("//tools:environments.bzl", "mcu_cpus")
Brian Silverman100534c2015-09-07 15:51:23 -04005
6cc_library(
Austin Schuha647d602018-02-18 14:05:15 -08007 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 Park33858a32018-09-28 23:05:48 -070016 "//aos/network:team_number",
Austin Schuha647d602018-02-18 14:05:15 -080017 "//aos/testing:googletest",
18 ],
Brian Silverman100534c2015-09-07 15:51:23 -040019)
20
21cc_test(
Austin Schuha647d602018-02-18 14:05:15 -080022 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 Silverman100534c2015-09-07 15:51:23 -040030)
31
32cc_library(
Austin Schuha647d602018-02-18 14:05:15 -080033 name = "hall_effect_tracker",
34 hdrs = [
35 "hall_effect_tracker.h",
36 ],
37 deps = [
38 ":queues",
39 ],
Brian Silverman100534c2015-09-07 15:51:23 -040040)
41
42queue_library(
Austin Schuha647d602018-02-18 14:05:15 -080043 name = "queues",
44 srcs = [
45 "control_loops.q",
46 ],
Brian Silverman7a7c24d2018-09-01 17:49:09 -070047 compatible_with = [
48 "//tools:armhf-debian",
49 ],
Brian Silverman100534c2015-09-07 15:51:23 -040050)
51
52cc_test(
Austin Schuha647d602018-02-18 14:05:15 -080053 name = "position_sensor_sim_test",
54 srcs = [
55 "position_sensor_sim_test.cc",
56 ],
57 deps = [
58 ":position_sensor_sim",
59 ":queues",
John Park33858a32018-09-28 23:05:48 -070060 "//aos/logging",
Austin Schuha647d602018-02-18 14:05:15 -080061 "//aos/testing:googletest",
62 ],
Brian Silverman100534c2015-09-07 15:51:23 -040063)
64
65cc_library(
Austin Schuha647d602018-02-18 14:05:15 -080066 name = "position_sensor_sim",
67 testonly = True,
68 srcs = [
69 "position_sensor_sim.cc",
70 ],
71 hdrs = [
72 "position_sensor_sim.h",
73 ],
Brian Silverman6470f442018-08-05 12:08:16 -070074 linkopts = [
75 "-lm",
76 ],
Austin Schuha647d602018-02-18 14:05:15 -080077 deps = [
78 ":gaussian_noise",
79 ":queues",
80 "//aos/testing:random_seed",
Philipp Schraderb3a057e2018-03-10 18:59:40 -080081 ],
Brian Silverman100534c2015-09-07 15:51:23 -040082)
83
84cc_library(
Austin Schuha647d602018-02-18 14:05:15 -080085 name = "gaussian_noise",
86 srcs = [
87 "gaussian_noise.cc",
88 ],
89 hdrs = [
90 "gaussian_noise.h",
91 ],
Philipp Schraderb3a057e2018-03-10 18:59:40 -080092 linkopts = [
93 "-lm",
Austin Schuha647d602018-02-18 14:05:15 -080094 ],
Brian Silverman100534c2015-09-07 15:51:23 -040095)
96
97cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070098 name = "coerce_goal_uc",
99 srcs = [
100 "coerce_goal.cc",
101 ],
102 hdrs = [
103 "coerce_goal.h",
104 ],
105 restricted_to = mcu_cpus,
106 deps = [
John Park33858a32018-09-28 23:05:48 -0700107 "//aos/controls:polytope_uc",
Austin Schuhbcce26a2018-03-26 23:41:24 -0700108 "//third_party/eigen",
109 ],
110)
111
112cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800113 name = "coerce_goal",
114 srcs = [
115 "coerce_goal.cc",
116 ],
117 hdrs = [
118 "coerce_goal.h",
119 ],
Brian Silverman6470f442018-08-05 12:08:16 -0700120 linkopts = [
121 "-lm",
122 ],
Austin Schuha647d602018-02-18 14:05:15 -0800123 deps = [
John Park33858a32018-09-28 23:05:48 -0700124 "//aos/controls:polytope",
Austin Schuha647d602018-02-18 14:05:15 -0800125 "//third_party/eigen",
126 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400127)
128
Brian Silverman6260c092018-01-14 15:21:36 -0800129# TODO(austin): Select isn't working right. We should be able to remove
130# logging conditionally with select and have CPU constraints work correctly.
131cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800132 name = "state_feedback_loop_uc",
133 hdrs = [
134 "state_feedback_loop.h",
135 ],
Brian Silverman1613b6e2018-09-03 19:10:37 -0700136 restricted_to = mcu_cpus,
Austin Schuha647d602018-02-18 14:05:15 -0800137 deps = [
John Park33858a32018-09-28 23:05:48 -0700138 "//aos:macros",
Austin Schuha647d602018-02-18 14:05:15 -0800139 "//third_party/eigen",
140 ],
Austin Schuh4cc4fe22017-11-23 19:13:09 -0800141)
142
143cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800144 name = "state_feedback_loop",
145 hdrs = [
146 "state_feedback_loop.h",
147 ],
Brian Silverman7a7c24d2018-09-01 17:49:09 -0700148 compatible_with = [
149 "//tools:armhf-debian",
150 ],
Austin Schuha647d602018-02-18 14:05:15 -0800151 deps = [
John Park33858a32018-09-28 23:05:48 -0700152 "//aos:macros",
153 "//aos/logging",
Austin Schuha647d602018-02-18 14:05:15 -0800154 "//third_party/eigen",
155 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400156)
Brian Silverman2b1957a2016-02-14 20:29:57 -0500157
158cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800159 name = "hybrid_state_feedback_loop",
160 hdrs = [
161 "hybrid_state_feedback_loop.h",
162 ],
163 deps = [
164 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700165 "//aos:macros",
166 "//aos/controls:control_loop",
167 "//aos/logging",
Austin Schuha647d602018-02-18 14:05:15 -0800168 "//third_party/eigen",
169 ],
Brian Silverman2b1957a2016-02-14 20:29:57 -0500170)
Austin Schuhacd335a2017-01-01 16:20:54 -0800171
172cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800173 name = "simple_capped_state_feedback_loop",
174 hdrs = [
175 "simple_capped_state_feedback_loop.h",
176 ],
177 deps = [
178 ":state_feedback_loop",
179 "//third_party/eigen",
180 ],
181)
182
183cc_library(
184 name = "runge_kutta",
185 hdrs = [
186 "runge_kutta.h",
187 ],
188 deps = [
189 "//third_party/eigen",
190 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800191)
192
193cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800194 name = "runge_kutta_test",
195 srcs = [
196 "runge_kutta_test.cc",
197 ],
198 deps = [
199 ":runge_kutta",
200 "//aos/testing:googletest",
201 "//third_party/eigen",
202 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800203)
Austin Schuh473a5652017-02-05 01:30:42 -0800204
Austin Schuh173a1592018-12-19 16:20:54 +1100205cc_library(
206 name = "fixed_quadrature",
207 hdrs = [
208 "fixed_quadrature.h",
209 ],
210)
211
212cc_test(
213 name = "fixed_quadrature_test",
214 srcs = [
215 "fixed_quadrature_test.cc",
216 ],
217 deps = [
218 ":fixed_quadrature",
219 "//aos/testing:googletest",
220 ],
221)
222
Austin Schuh3634ed32017-02-05 16:28:49 -0800223queue_library(
Austin Schuha647d602018-02-18 14:05:15 -0800224 name = "profiled_subsystem_queue",
225 srcs = [
226 "profiled_subsystem.q",
227 ],
228 deps = [
229 ":queues",
230 ],
Austin Schuh3634ed32017-02-05 16:28:49 -0800231)
232
Austin Schuh473a5652017-02-05 01:30:42 -0800233cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800234 name = "profiled_subsystem",
235 srcs = [
236 "profiled_subsystem.cc",
237 ],
238 hdrs = [
239 "profiled_subsystem.h",
240 ],
241 deps = [
242 ":profiled_subsystem_queue",
243 ":simple_capped_state_feedback_loop",
244 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700245 "//aos/controls:control_loop",
246 "//aos/util:trapezoid_profile",
Austin Schuha647d602018-02-18 14:05:15 -0800247 "//frc971/zeroing",
248 ],
Austin Schuh473a5652017-02-05 01:30:42 -0800249)
Austin Schuha647d602018-02-18 14:05:15 -0800250
251cc_library(
252 name = "jacobian",
253 hdrs = [
254 "jacobian.h",
255 ],
256 deps = [
257 "//third_party/eigen",
258 ],
259)
260
261cc_test(
262 name = "jacobian_test",
263 srcs = [
264 "jacobian_test.cc",
265 ],
266 deps = [
267 ":jacobian",
268 "//aos/testing:googletest",
269 "//third_party/eigen",
270 ],
271)
272
Austin Schuh03785132018-02-19 18:29:06 -0800273cc_library(
274 name = "dlqr",
275 hdrs = [
276 "dlqr.h",
277 ],
278 visibility = ["//visibility:public"],
279 deps = [
280 "//third_party/eigen",
281 "@slycot_repo//:slicot",
282 ],
283)
Brian Silverman6470f442018-08-05 12:08:16 -0700284
285py_library(
286 name = "python_init",
287 srcs = ["__init__.py"],
288 visibility = ["//visibility:public"],
289 deps = ["//frc971:python_init"],
290)