blob: 5998afca9a13999b32d05c2f101ed967cf0308fa [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 ],
71 deps = [
72 ":gaussian_noise",
73 ":queues",
74 "//aos/testing:random_seed",
75 "//debian:libm",
76 ],
Brian Silverman100534c2015-09-07 15:51:23 -040077)
78
79cc_library(
Austin Schuha647d602018-02-18 14:05:15 -080080 name = "gaussian_noise",
81 srcs = [
82 "gaussian_noise.cc",
83 ],
84 hdrs = [
85 "gaussian_noise.h",
86 ],
87 deps = [
88 "//debian:libm",
89 ],
Brian Silverman100534c2015-09-07 15:51:23 -040090)
91
92cc_library(
Austin Schuhbcce26a2018-03-26 23:41:24 -070093 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
107cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800108 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 Silverman100534c2015-09-07 15:51:23 -0400120)
121
Brian Silverman6260c092018-01-14 15:21:36 -0800122# TODO(austin): Select isn't working right. We should be able to remove
123# logging conditionally with select and have CPU constraints work correctly.
124cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800125 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 Schuh4cc4fe22017-11-23 19:13:09 -0800134)
135
136cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800137 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 Silverman100534c2015-09-07 15:51:23 -0400146)
Brian Silverman2b1957a2016-02-14 20:29:57 -0500147
148cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800149 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 Silverman2b1957a2016-02-14 20:29:57 -0500160)
Austin Schuhacd335a2017-01-01 16:20:54 -0800161
162cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800163 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
173cc_library(
174 name = "runge_kutta",
175 hdrs = [
176 "runge_kutta.h",
177 ],
178 deps = [
179 "//third_party/eigen",
180 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800181)
182
183cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800184 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 Schuhacd335a2017-01-01 16:20:54 -0800193)
Austin Schuh473a5652017-02-05 01:30:42 -0800194
Austin Schuh3634ed32017-02-05 16:28:49 -0800195queue_library(
Austin Schuha647d602018-02-18 14:05:15 -0800196 name = "profiled_subsystem_queue",
197 srcs = [
198 "profiled_subsystem.q",
199 ],
200 deps = [
201 ":queues",
202 ],
Austin Schuh3634ed32017-02-05 16:28:49 -0800203)
204
Austin Schuh473a5652017-02-05 01:30:42 -0800205cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800206 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 Schuh473a5652017-02-05 01:30:42 -0800221)
Austin Schuha647d602018-02-18 14:05:15 -0800222
223cc_library(
224 name = "jacobian",
225 hdrs = [
226 "jacobian.h",
227 ],
228 deps = [
229 "//third_party/eigen",
230 ],
231)
232
233cc_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 Schuh03785132018-02-19 18:29:06 -0800245cc_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)