blob: 699eb5ac74c112db942862936f2be25d81ae6c1e [file] [log] [blame]
Brian Silverman6470f442018-08-05 12:08:16 -07001package(default_visibility = ["//visibility:public"])
Austin Schuh572ff402015-11-08 12:17:50 -08002
Philipp Schrader26147542023-01-03 01:44:07 -08003py_library(
4 name = "constants",
5 srcs = ["constants.py"],
6 deps = [
7 "@pip//pygobject",
8 ],
9)
10
11py_library(
12 name = "drawing_constants",
13 srcs = ["drawing_constants.py"],
14 deps = [
15 ":color",
16 "@pip//numpy",
17 "@pip//pygobject",
18 ],
19)
20
Brian Silverman6260c092018-01-14 15:21:36 -080021py_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070022 name = "haptic_wheel",
23 srcs = [
24 "haptic_wheel.py",
25 ],
26 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080027 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070028 deps = [
Brian Silverman6470f442018-08-05 12:08:16 -070029 "//frc971/control_loops/python:controls",
Philipp Schraderebb658f2022-09-17 17:31:09 -070030 "@pip//glog",
31 "@pip//matplotlib",
Austin Schuh6647cb22023-02-21 12:35:25 -080032 "@pip//pygobject",
Philipp Schraderebb658f2022-09-17 17:31:09 -070033 "@pip//python_gflags",
Brian Silverman6470f442018-08-05 12:08:16 -070034 ],
Brian Silverman6260c092018-01-14 15:21:36 -080035)
36
Austin Schuh572ff402015-11-08 12:17:50 -080037py_library(
Brian Silverman6470f442018-08-05 12:08:16 -070038 name = "controls",
39 srcs = [
40 "cim.py",
41 "control_loop.py",
42 "controls.py",
43 "libcdd.py",
44 "polytope.py",
45 ],
46 data = [
47 "//third_party/cddlib:_cddlib.so",
Brian Silverman6470f442018-08-05 12:08:16 -070048 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080049 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070050 deps = [
51 ":python_init",
Philipp Schraderebb658f2022-09-17 17:31:09 -070052 "@pip//glog",
53 "@pip//scipy",
Brian Silverman6470f442018-08-05 12:08:16 -070054 ],
Austin Schuh572ff402015-11-08 12:17:50 -080055)
Brian Silverman9c89c0a2016-01-08 01:04:57 -080056
57py_test(
Brian Silverman6470f442018-08-05 12:08:16 -070058 name = "polytope_test",
59 srcs = [
60 "polytope_test.py",
61 ],
62 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080063 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070064 deps = [
65 ":controls",
66 ":python_init",
67 ],
Brian Silverman9c89c0a2016-01-08 01:04:57 -080068)
Brian Silverman69120d72016-03-08 16:56:16 -050069
70py_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070071 name = "down_estimator",
72 srcs = [
73 "down_estimator.py",
74 ],
75 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080076 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070077 deps = [
78 ":controls",
79 ":python_init",
Philipp Schraderebb658f2022-09-17 17:31:09 -070080 "@pip//matplotlib",
Austin Schuh6647cb22023-02-21 12:35:25 -080081 "@pip//pygobject",
Brian Silverman6470f442018-08-05 12:08:16 -070082 ],
Brian Silverman69120d72016-03-08 16:56:16 -050083)
Campbell Crowley33e0e3d2017-12-27 17:55:40 -080084
85py_library(
Brian Silverman6470f442018-08-05 12:08:16 -070086 name = "drivetrain",
87 srcs = [
88 "drivetrain.py",
89 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080090 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070091 deps = [
92 ":controls",
93 ":python_init",
Philipp Schraderebb658f2022-09-17 17:31:09 -070094 "@pip//matplotlib",
Austin Schuh6647cb22023-02-21 12:35:25 -080095 "@pip//pygobject",
Brian Silverman6470f442018-08-05 12:08:16 -070096 ],
Campbell Crowley33e0e3d2017-12-27 17:55:40 -080097)
98
99py_library(
Alex Perry20762632019-01-21 17:48:02 -0500100 name = "libspline",
101 srcs = [
102 "libspline.py",
103 ],
104 data = [
Alex Perrya60da442019-01-21 19:00:27 -0500105 "//frc971/control_loops/drivetrain:spline.so",
Alex Perry20762632019-01-21 17:48:02 -0500106 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800107 target_compatible_with = ["@platforms//os:linux"],
Alex Perry50baefc2019-01-27 13:26:29 -0800108 deps = [
109 ":python_init",
110 ],
Alex Perry20762632019-01-21 17:48:02 -0500111)
112
Alex Perrya60da442019-01-21 19:00:27 -0500113py_test(
114 name = "lib_spline_test",
115 srcs = [
116 "lib_spline_test.py",
117 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800118 target_compatible_with = ["@platforms//os:linux"],
Alex Perrya60da442019-01-21 19:00:27 -0500119 deps = [
120 ":libspline",
Alex Perry50baefc2019-01-27 13:26:29 -0800121 ":python_init",
Philipp Schraderebb658f2022-09-17 17:31:09 -0700122 "@pip//numpy",
Tyler Chatow12581562019-01-26 20:42:42 -0800123 ],
Alex Perrya60da442019-01-21 19:00:27 -0500124)
125
Alex Perry20762632019-01-21 17:48:02 -0500126py_library(
Brian Silverman6470f442018-08-05 12:08:16 -0700127 name = "polydrivetrain",
128 srcs = [
129 "polydrivetrain.py",
130 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800131 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -0700132 deps = [
133 ":controls",
134 ":drivetrain",
135 ":python_init",
Philipp Schraderebb658f2022-09-17 17:31:09 -0700136 "@pip//glog",
137 "@pip//matplotlib",
Austin Schuh6647cb22023-02-21 12:35:25 -0800138 "@pip//pygobject",
Brian Silverman6470f442018-08-05 12:08:16 -0700139 ],
140)
141
142py_library(
143 name = "python_init",
144 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800145 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700146 visibility = ["//visibility:public"],
147 deps = ["//frc971/control_loops:python_init"],
Campbell Crowley33e0e3d2017-12-27 17:55:40 -0800148)
Austin Schuh35d19872018-11-30 15:50:47 +1100149
Austin Schuhb5d302f2019-01-20 20:51:19 -0800150py_library(
151 name = "linear_system",
152 srcs = ["linear_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800153 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhb5d302f2019-01-20 20:51:19 -0800154 visibility = ["//visibility:public"],
155 deps = [
156 ":controls",
157 "//aos/util:py_trapezoid_profile",
158 "//frc971/control_loops:python_init",
Philipp Schraderebb658f2022-09-17 17:31:09 -0700159 "@pip//matplotlib",
Austin Schuh6647cb22023-02-21 12:35:25 -0800160 "@pip//pygobject",
Austin Schuhb5d302f2019-01-20 20:51:19 -0800161 ],
162)
Austin Schuh2e554032019-01-21 15:07:27 -0800163
164py_library(
165 name = "angular_system",
166 srcs = ["angular_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800167 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuh2e554032019-01-21 15:07:27 -0800168 visibility = ["//visibility:public"],
169 deps = [
170 ":controls",
171 "//aos/util:py_trapezoid_profile",
172 "//frc971/control_loops:python_init",
Philipp Schraderebb658f2022-09-17 17:31:09 -0700173 "@pip//matplotlib",
Austin Schuh6647cb22023-02-21 12:35:25 -0800174 "@pip//pygobject",
Austin Schuh2e554032019-01-21 15:07:27 -0800175 ],
176)
johnp55310b82019-01-26 18:26:24 -0800177
Ravago Jones2e8ac662023-07-01 22:57:02 -0700178py_library(
179 name = "angular_system_current",
180 srcs = ["angular_system_current.py"],
181 target_compatible_with = ["@platforms//cpu:x86_64"],
182 visibility = ["//visibility:public"],
183 deps = [
184 ":controls",
185 "//aos/util:py_trapezoid_profile",
186 "//frc971/control_loops:python_init",
187 "@pip//matplotlib",
188 "@pip//pygobject",
189 ],
190)
191
johnp55310b82019-01-26 18:26:24 -0800192py_binary(
John Park91e69732019-03-03 13:12:43 -0800193 name = "spline_graph",
johnp55310b82019-01-26 18:26:24 -0800194 srcs = [
Austin Schuha4f69d62020-02-28 13:58:14 -0800195 "graph.py",
Ravago Jonesfa8da562022-07-02 18:10:22 -0700196 "multispline.py",
Tyler Chatow12581562019-01-26 20:42:42 -0800197 "path_edit.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800198 "spline_drawing.py",
John Park91e69732019-03-03 13:12:43 -0800199 "spline_graph.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800200 "spline_writer.py",
johnp55310b82019-01-26 18:26:24 -0800201 ],
Ravago Jonesc26b9162021-06-30 20:12:48 -0700202 data = glob([
203 "field_images/*.png",
204 "field_images/*.svg",
Maxwell Henderson4a18b192023-03-10 15:04:04 -0800205 ]) + ["//third_party/y2023/field:pictures"],
John Park91e69732019-03-03 13:12:43 -0800206 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800207 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800208 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800209 deps = [
Austin Schuha4f69d62020-02-28 13:58:14 -0800210 ":basic_window",
Philipp Schrader26147542023-01-03 01:44:07 -0800211 ":color",
212 ":constants",
213 ":drawing_constants",
johnp55310b82019-01-26 18:26:24 -0800214 ":libspline",
Tyler Chatow12581562019-01-26 20:42:42 -0800215 ":python_init",
Philipp Schraderebb658f2022-09-17 17:31:09 -0700216 "@pip//matplotlib",
217 "@pip//numpy",
218 "@pip//pygobject",
219 "@pip//scipy",
johnp55310b82019-01-26 18:26:24 -0800220 ],
221)
222
223py_library(
224 name = "basic_window",
225 srcs = [
226 "basic_window.py",
johnp55310b82019-01-26 18:26:24 -0800227 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800228 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800229 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800230 deps = [
Philipp Schrader26147542023-01-03 01:44:07 -0800231 ":constants",
johnp55310b82019-01-26 18:26:24 -0800232 ":python_init",
Philipp Schraderebb658f2022-09-17 17:31:09 -0700233 "@pip//pygobject",
johnp55310b82019-01-26 18:26:24 -0800234 ],
235)
Andrew Runke6842bf92019-01-26 15:38:25 -0800236
237py_library(
238 name = "color",
239 srcs = [
240 "color.py",
241 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800242 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800243 visibility = ["//visibility:public"],
Andrew Runke6842bf92019-01-26 15:38:25 -0800244 deps = [
245 ":python_init",
246 ],
247)
Tyler Chatow12581562019-01-26 20:42:42 -0800248
249py_binary(
Maxwell Henderson34242992024-01-07 12:39:11 -0800250 name = "flywheel",
251 srcs = [
252 "flywheel.py",
253 ],
254 legacy_create_init = False,
255 target_compatible_with = ["@platforms//cpu:x86_64"],
256 deps = [
257 ":python_init",
258 "//frc971/control_loops/python:controls",
259 "@pip//matplotlib",
260 "@pip//pygobject",
261 ],
262)
263
264py_binary(
Tyler Chatow12581562019-01-26 20:42:42 -0800265 name = "static_zeroing_single_dof_profiled_subsystem_test",
266 srcs = [
267 "static_zeroing_single_dof_profiled_subsystem_test.py",
268 ],
269 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800270 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800271 deps = [
272 ":controls",
273 ":linear_system",
274 ":python_init",
Philipp Schraderebb658f2022-09-17 17:31:09 -0700275 "@pip//glog",
276 "@pip//python_gflags",
Tyler Chatow12581562019-01-26 20:42:42 -0800277 ],
278)