blob: 7c39a859b7bbfb101518ce5ffe7d965f9ea65931 [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 = [
16 "//aos/common/network:team_number",
17 "//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 Silverman100534c2015-09-07 15:51:23 -040047)
48
49cc_test(
Austin Schuha647d602018-02-18 14:05:15 -080050 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 Silverman100534c2015-09-07 15:51:23 -040060)
61
62cc_library(
Austin Schuha647d602018-02-18 14:05:15 -080063 name = "position_sensor_sim",
64 testonly = True,
65 srcs = [
66 "position_sensor_sim.cc",
67 ],
68 hdrs = [
69 "position_sensor_sim.h",
70 ],
Brian Silverman6470f442018-08-05 12:08:16 -070071 linkopts = [
72 "-lm",
73 ],
Austin Schuha647d602018-02-18 14:05:15 -080074 deps = [
75 ":gaussian_noise",
76 ":queues",
77 "//aos/testing:random_seed",
Philipp Schraderb3a057e2018-03-10 18:59:40 -080078 ],
Brian Silverman100534c2015-09-07 15:51:23 -040079)
80
81cc_library(
Austin Schuha647d602018-02-18 14:05:15 -080082 name = "gaussian_noise",
83 srcs = [
84 "gaussian_noise.cc",
85 ],
86 hdrs = [
87 "gaussian_noise.h",
88 ],
Philipp Schraderb3a057e2018-03-10 18:59:40 -080089 linkopts = [
90 "-lm",
Austin Schuha647d602018-02-18 14:05:15 -080091 ],
Brian Silverman100534c2015-09-07 15:51:23 -040092)
93
94cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070095 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
109cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800110 name = "coerce_goal",
111 srcs = [
112 "coerce_goal.cc",
113 ],
114 hdrs = [
115 "coerce_goal.h",
116 ],
Brian Silverman6470f442018-08-05 12:08:16 -0700117 linkopts = [
118 "-lm",
119 ],
Austin Schuha647d602018-02-18 14:05:15 -0800120 deps = [
121 "//aos/common/controls:polytope",
Austin Schuha647d602018-02-18 14:05:15 -0800122 "//third_party/eigen",
123 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400124)
125
Brian Silverman6260c092018-01-14 15:21:36 -0800126# TODO(austin): Select isn't working right. We should be able to remove
127# logging conditionally with select and have CPU constraints work correctly.
128cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800129 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 Schuh4cc4fe22017-11-23 19:13:09 -0800138)
139
140cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800141 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 Silverman100534c2015-09-07 15:51:23 -0400150)
Brian Silverman2b1957a2016-02-14 20:29:57 -0500151
152cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800153 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 Silverman2b1957a2016-02-14 20:29:57 -0500164)
Austin Schuhacd335a2017-01-01 16:20:54 -0800165
166cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800167 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
177cc_library(
178 name = "runge_kutta",
179 hdrs = [
180 "runge_kutta.h",
181 ],
182 deps = [
183 "//third_party/eigen",
184 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800185)
186
187cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800188 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 Schuhacd335a2017-01-01 16:20:54 -0800197)
Austin Schuh473a5652017-02-05 01:30:42 -0800198
Austin Schuh3634ed32017-02-05 16:28:49 -0800199queue_library(
Austin Schuha647d602018-02-18 14:05:15 -0800200 name = "profiled_subsystem_queue",
201 srcs = [
202 "profiled_subsystem.q",
203 ],
204 deps = [
205 ":queues",
206 ],
Austin Schuh3634ed32017-02-05 16:28:49 -0800207)
208
Austin Schuh473a5652017-02-05 01:30:42 -0800209cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800210 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 Schuh473a5652017-02-05 01:30:42 -0800225)
Austin Schuha647d602018-02-18 14:05:15 -0800226
227cc_library(
228 name = "jacobian",
229 hdrs = [
230 "jacobian.h",
231 ],
232 deps = [
233 "//third_party/eigen",
234 ],
235)
236
237cc_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 Schuh03785132018-02-19 18:29:06 -0800249cc_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)
Brian Silverman6470f442018-08-05 12:08:16 -0700260
261py_library(
262 name = "python_init",
263 srcs = ["__init__.py"],
264 visibility = ["//visibility:public"],
265 deps = ["//frc971:python_init"],
266)