blob: eccbb1458ca37a2ed8502a0f8cf945b3b3c1d27d [file] [log] [blame]
Brian Silverman100534c2015-09-07 15:51:23 -04001package(default_visibility = ['//visibility:public'])
2
Austin Schuh4f857292018-02-15 23:42:04 -08003load('//aos/build:queues.bzl', 'queue_library')
Brian Silverman100534c2015-09-07 15:51:23 -04004
5cc_library(
6 name = 'team_number_test_environment',
7 srcs = [
8 'team_number_test_environment.cc',
9 ],
10 hdrs = [
11 'team_number_test_environment.h',
12 ],
13 deps = [
14 '//aos/common/network:team_number',
Brian Silverman258b9172015-09-19 14:32:57 -040015 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -040016 ],
Brian Silvermanb200c172017-01-02 17:35:35 -080017 testonly = True,
Brian Silverman100534c2015-09-07 15:51:23 -040018)
19
20cc_test(
Austin Schuh4cc4fe22017-11-23 19:13:09 -080021 name = 'hybrid_state_feedback_loop_test',
Brian Silverman100534c2015-09-07 15:51:23 -040022 srcs = [
Austin Schuh4cc4fe22017-11-23 19:13:09 -080023 'hybrid_state_feedback_loop_test.cc',
Brian Silverman100534c2015-09-07 15:51:23 -040024 ],
25 deps = [
Austin Schuh4cc4fe22017-11-23 19:13:09 -080026 ':hybrid_state_feedback_loop',
Brian Silverman258b9172015-09-19 14:32:57 -040027 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -040028 ],
29)
30
31cc_library(
32 name = 'hall_effect_tracker',
Austin Schuh044e18b2015-10-21 20:17:09 -070033 hdrs = [
34 'hall_effect_tracker.h',
35 ],
Brian Silverman100534c2015-09-07 15:51:23 -040036 deps = [
37 ':queues',
38 ],
39)
40
41queue_library(
42 name = 'queues',
43 srcs = [
44 'control_loops.q',
45 ],
46)
47
48cc_test(
49 name = 'position_sensor_sim_test',
50 srcs = [
51 'position_sensor_sim_test.cc',
52 ],
53 deps = [
54 ':queues',
55 ':position_sensor_sim',
Brian Silverman258b9172015-09-19 14:32:57 -040056 '//aos/testing:googletest',
Brian Silverman100534c2015-09-07 15:51:23 -040057 '//aos/common/logging',
58 ],
59)
60
61cc_library(
62 name = 'position_sensor_sim',
Brian Silverman33d0d6e2016-05-15 23:33:39 -070063 testonly = True,
Brian Silverman100534c2015-09-07 15:51:23 -040064 srcs = [
65 'position_sensor_sim.cc',
66 ],
67 hdrs = [
68 'position_sensor_sim.h',
69 ],
70 deps = [
71 ':queues',
72 ':gaussian_noise',
Austin Schuh55139fe2015-10-14 23:55:24 -070073 '//debian:libm',
Brian Silverman33d0d6e2016-05-15 23:33:39 -070074 '//aos/testing:random_seed',
Brian Silverman100534c2015-09-07 15:51:23 -040075 ],
76)
77
78cc_library(
79 name = 'gaussian_noise',
80 srcs = [
81 'gaussian_noise.cc',
82 ],
83 hdrs = [
84 'gaussian_noise.h',
85 ],
Brian Silvermanf1cff392015-10-11 19:36:18 -040086 deps = [
Austin Schuh55139fe2015-10-14 23:55:24 -070087 '//debian:libm',
Brian Silvermanf1cff392015-10-11 19:36:18 -040088 ],
Brian Silverman100534c2015-09-07 15:51:23 -040089)
90
91cc_library(
92 name = 'coerce_goal',
93 srcs = [
94 'coerce_goal.cc',
95 ],
96 hdrs = [
97 'coerce_goal.h',
98 ],
99 deps = [
100 '//third_party/eigen',
101 '//aos/common/controls:polytope',
Austin Schuh55139fe2015-10-14 23:55:24 -0700102 '//debian:libm',
Brian Silverman100534c2015-09-07 15:51:23 -0400103 ],
104)
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(
109 name = 'state_feedback_loop_uc',
110 hdrs = [
111 'state_feedback_loop.h',
112 ],
113 deps = [
114 '//aos/common:macros',
115 '//third_party/eigen',
116 ],
117 restricted_to = ['//tools:cortex-m4f'],
118)
Brian Silverman100534c2015-09-07 15:51:23 -0400119cc_library(
120 name = 'state_feedback_loop',
Austin Schuh044e18b2015-10-21 20:17:09 -0700121 hdrs = [
122 'state_feedback_loop.h',
123 ],
Brian Silverman100534c2015-09-07 15:51:23 -0400124 deps = [
Austin Schuh4cc4fe22017-11-23 19:13:09 -0800125 '//aos/common/logging',
126 '//aos/common:macros',
127 '//third_party/eigen',
128 ],
129)
130
131cc_library(
132 name = 'hybrid_state_feedback_loop',
133 hdrs = [
134 'hybrid_state_feedback_loop.h',
135 ],
136 deps = [
137 ':state_feedback_loop',
Austin Schuh3ad5ed82017-02-25 21:36:19 -0800138 '//aos/common/controls:control_loop',
Austin Schuh044e18b2015-10-21 20:17:09 -0700139 '//aos/common/logging',
140 '//aos/common:macros',
Austin Schuh3ad5ed82017-02-25 21:36:19 -0800141 '//third_party/eigen',
Brian Silverman100534c2015-09-07 15:51:23 -0400142 ],
143)
Brian Silverman2b1957a2016-02-14 20:29:57 -0500144
145cc_library(
146 name = 'simple_capped_state_feedback_loop',
147 hdrs = [
148 'simple_capped_state_feedback_loop.h',
149 ],
150 deps = [
151 '//third_party/eigen',
152 ':state_feedback_loop',
153 ],
154)
Austin Schuhacd335a2017-01-01 16:20:54 -0800155
156cc_library(
157 name = 'runge_kutta',
158 hdrs = [
159 'runge_kutta.h',
160 ],
161 deps = [
162 '//third_party/eigen',
163 ],
164)
165
166cc_test(
167 name = 'runge_kutta_test',
168 srcs = [
169 'runge_kutta_test.cc',
170 ],
171 deps = [
172 ':runge_kutta',
173 '//aos/testing:googletest',
174 '//third_party/eigen',
175 ],
176)
Austin Schuh473a5652017-02-05 01:30:42 -0800177
Austin Schuh3634ed32017-02-05 16:28:49 -0800178queue_library(
179 name = 'profiled_subsystem_queue',
180 srcs = [
181 'profiled_subsystem.q',
182 ],
183 deps = [
184 ':queues',
185 ],
186)
187
Austin Schuh473a5652017-02-05 01:30:42 -0800188cc_library(
189 name = 'profiled_subsystem',
190 srcs = [
191 'profiled_subsystem.cc',
192 ],
193 hdrs = [
194 'profiled_subsystem.h',
195 ],
196 deps = [
Austin Schuh3634ed32017-02-05 16:28:49 -0800197 ':profiled_subsystem_queue',
Austin Schuh473a5652017-02-05 01:30:42 -0800198 ':simple_capped_state_feedback_loop',
199 ':state_feedback_loop',
200 '//aos/common/controls:control_loop',
201 '//aos/common/util:trapezoid_profile',
202 '//frc971/zeroing:zeroing',
203 ],
204)