blob: 01dc25eb62e3348492647ddc1962ed018bfdd10b [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")
Brian Silverman100534c2015-09-07 15:51:23 -04004
5cc_library(
Austin Schuha647d602018-02-18 14:05:15 -08006 name = "team_number_test_environment",
7 testonly = True,
8 srcs = [
9 "team_number_test_environment.cc",
10 ],
11 hdrs = [
12 "team_number_test_environment.h",
13 ],
14 deps = [
15 "//aos/common/network:team_number",
16 "//aos/testing:googletest",
17 ],
Brian Silverman100534c2015-09-07 15:51:23 -040018)
19
20cc_test(
Austin Schuha647d602018-02-18 14:05:15 -080021 name = "hybrid_state_feedback_loop_test",
22 srcs = [
23 "hybrid_state_feedback_loop_test.cc",
24 ],
25 deps = [
26 ":hybrid_state_feedback_loop",
27 "//aos/testing:googletest",
28 ],
Brian Silverman100534c2015-09-07 15:51:23 -040029)
30
31cc_library(
Austin Schuha647d602018-02-18 14:05:15 -080032 name = "hall_effect_tracker",
33 hdrs = [
34 "hall_effect_tracker.h",
35 ],
36 deps = [
37 ":queues",
38 ],
Brian Silverman100534c2015-09-07 15:51:23 -040039)
40
41queue_library(
Austin Schuha647d602018-02-18 14:05:15 -080042 name = "queues",
43 srcs = [
44 "control_loops.q",
45 ],
Brian Silverman100534c2015-09-07 15:51:23 -040046)
47
48cc_test(
Austin Schuha647d602018-02-18 14:05:15 -080049 name = "position_sensor_sim_test",
50 srcs = [
51 "position_sensor_sim_test.cc",
52 ],
53 deps = [
54 ":position_sensor_sim",
55 ":queues",
56 "//aos/common/logging",
57 "//aos/testing:googletest",
58 ],
Brian Silverman100534c2015-09-07 15:51:23 -040059)
60
61cc_library(
Austin Schuha647d602018-02-18 14:05:15 -080062 name = "position_sensor_sim",
63 testonly = True,
64 srcs = [
65 "position_sensor_sim.cc",
66 ],
67 hdrs = [
68 "position_sensor_sim.h",
69 ],
70 deps = [
71 ":gaussian_noise",
72 ":queues",
73 "//aos/testing:random_seed",
74 "//debian:libm",
75 ],
Brian Silverman100534c2015-09-07 15:51:23 -040076)
77
78cc_library(
Austin Schuha647d602018-02-18 14:05:15 -080079 name = "gaussian_noise",
80 srcs = [
81 "gaussian_noise.cc",
82 ],
83 hdrs = [
84 "gaussian_noise.h",
85 ],
86 deps = [
87 "//debian:libm",
88 ],
Brian Silverman100534c2015-09-07 15:51:23 -040089)
90
91cc_library(
Austin Schuha647d602018-02-18 14:05:15 -080092 name = "coerce_goal",
93 srcs = [
94 "coerce_goal.cc",
95 ],
96 hdrs = [
97 "coerce_goal.h",
98 ],
99 deps = [
100 "//aos/common/controls:polytope",
101 "//debian:libm",
102 "//third_party/eigen",
103 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400104)
105
Brian Silverman6260c092018-01-14 15:21:36 -0800106# TODO(austin): Select isn't working right. We should be able to remove
107# logging conditionally with select and have CPU constraints work correctly.
108cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800109 name = "state_feedback_loop_uc",
110 hdrs = [
111 "state_feedback_loop.h",
112 ],
113 restricted_to = ["//tools:cortex-m4f"],
114 deps = [
115 "//aos/common:macros",
116 "//third_party/eigen",
117 ],
Austin Schuh4cc4fe22017-11-23 19:13:09 -0800118)
119
120cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800121 name = "state_feedback_loop",
122 hdrs = [
123 "state_feedback_loop.h",
124 ],
125 deps = [
126 "//aos/common:macros",
127 "//aos/common/logging",
128 "//third_party/eigen",
129 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400130)
Brian Silverman2b1957a2016-02-14 20:29:57 -0500131
132cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800133 name = "hybrid_state_feedback_loop",
134 hdrs = [
135 "hybrid_state_feedback_loop.h",
136 ],
137 deps = [
138 ":state_feedback_loop",
139 "//aos/common:macros",
140 "//aos/common/controls:control_loop",
141 "//aos/common/logging",
142 "//third_party/eigen",
143 ],
Brian Silverman2b1957a2016-02-14 20:29:57 -0500144)
Austin Schuhacd335a2017-01-01 16:20:54 -0800145
146cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800147 name = "simple_capped_state_feedback_loop",
148 hdrs = [
149 "simple_capped_state_feedback_loop.h",
150 ],
151 deps = [
152 ":state_feedback_loop",
153 "//third_party/eigen",
154 ],
155)
156
157cc_library(
158 name = "runge_kutta",
159 hdrs = [
160 "runge_kutta.h",
161 ],
162 deps = [
163 "//third_party/eigen",
164 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800165)
166
167cc_test(
Austin Schuha647d602018-02-18 14:05:15 -0800168 name = "runge_kutta_test",
169 srcs = [
170 "runge_kutta_test.cc",
171 ],
172 deps = [
173 ":runge_kutta",
174 "//aos/testing:googletest",
175 "//third_party/eigen",
176 ],
Austin Schuhacd335a2017-01-01 16:20:54 -0800177)
Austin Schuh473a5652017-02-05 01:30:42 -0800178
Austin Schuh3634ed32017-02-05 16:28:49 -0800179queue_library(
Austin Schuha647d602018-02-18 14:05:15 -0800180 name = "profiled_subsystem_queue",
181 srcs = [
182 "profiled_subsystem.q",
183 ],
184 deps = [
185 ":queues",
186 ],
Austin Schuh3634ed32017-02-05 16:28:49 -0800187)
188
Austin Schuh473a5652017-02-05 01:30:42 -0800189cc_library(
Austin Schuha647d602018-02-18 14:05:15 -0800190 name = "profiled_subsystem",
191 srcs = [
192 "profiled_subsystem.cc",
193 ],
194 hdrs = [
195 "profiled_subsystem.h",
196 ],
197 deps = [
198 ":profiled_subsystem_queue",
199 ":simple_capped_state_feedback_loop",
200 ":state_feedback_loop",
201 "//aos/common/controls:control_loop",
202 "//aos/common/util:trapezoid_profile",
203 "//frc971/zeroing",
204 ],
Austin Schuh473a5652017-02-05 01:30:42 -0800205)
Austin Schuha647d602018-02-18 14:05:15 -0800206
207cc_library(
208 name = "jacobian",
209 hdrs = [
210 "jacobian.h",
211 ],
212 deps = [
213 "//third_party/eigen",
214 ],
215)
216
217cc_test(
218 name = "jacobian_test",
219 srcs = [
220 "jacobian_test.cc",
221 ],
222 deps = [
223 ":jacobian",
224 "//aos/testing:googletest",
225 "//third_party/eigen",
226 ],
227)
228