blob: a25a2e89587222194415e974e4996090bdd218f1 [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 Schuh3634ed32017-02-05 16:28:49 -0800205queue_library(
Austin Schuha647d602018-02-18 14:05:15 -0800206 name = "profiled_subsystem_queue",
207 srcs = [
208 "profiled_subsystem.q",
209 ],
210 deps = [
211 ":queues",
212 ],
Austin Schuh3634ed32017-02-05 16:28:49 -0800213)
214
Austin Schuh473a5652017-02-05 01:30:42 -0800215cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800216 name = "profiled_subsystem",
217 srcs = [
218 "profiled_subsystem.cc",
219 ],
220 hdrs = [
221 "profiled_subsystem.h",
222 ],
223 deps = [
224 ":profiled_subsystem_queue",
225 ":simple_capped_state_feedback_loop",
226 ":state_feedback_loop",
John Park33858a32018-09-28 23:05:48 -0700227 "//aos/controls:control_loop",
228 "//aos/util:trapezoid_profile",
Austin Schuha647d602018-02-18 14:05:15 -0800229 "//frc971/zeroing",
230 ],
Austin Schuh473a5652017-02-05 01:30:42 -0800231)
Austin Schuha647d602018-02-18 14:05:15 -0800232
233cc_library(
234 name = "jacobian",
235 hdrs = [
236 "jacobian.h",
237 ],
238 deps = [
239 "//third_party/eigen",
240 ],
241)
242
243cc_test(
244 name = "jacobian_test",
245 srcs = [
246 "jacobian_test.cc",
247 ],
248 deps = [
249 ":jacobian",
250 "//aos/testing:googletest",
251 "//third_party/eigen",
252 ],
253)
254
Austin Schuh03785132018-02-19 18:29:06 -0800255cc_library(
256 name = "dlqr",
257 hdrs = [
258 "dlqr.h",
259 ],
260 visibility = ["//visibility:public"],
261 deps = [
262 "//third_party/eigen",
263 "@slycot_repo//:slicot",
264 ],
265)
Brian Silverman6470f442018-08-05 12:08:16 -0700266
267py_library(
268 name = "python_init",
269 srcs = ["__init__.py"],
270 visibility = ["//visibility:public"],
271 deps = ["//frc971:python_init"],
272)