blob: ef7b31b5747d0d93c8567c163ae7493a3b8787b4 [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 = [
29 "//external:python-gflags",
30 "//external:python-glog",
31 "//frc971/control_loops/python:controls",
Austin Schuh085eab92020-11-26 13:54:51 -080032 "@matplotlib_repo//:matplotlib3",
Brian Silverman6470f442018-08-05 12:08:16 -070033 ],
Brian Silverman6260c092018-01-14 15:21:36 -080034)
35
Austin Schuh572ff402015-11-08 12:17:50 -080036py_library(
Brian Silverman6470f442018-08-05 12:08:16 -070037 name = "controls",
38 srcs = [
39 "cim.py",
40 "control_loop.py",
41 "controls.py",
42 "libcdd.py",
43 "polytope.py",
44 ],
45 data = [
46 "//third_party/cddlib:_cddlib.so",
Brian Silverman6470f442018-08-05 12:08:16 -070047 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080048 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070049 deps = [
50 ":python_init",
51 "//external:python-glog",
Philipp Schrader092a62d2021-12-05 23:15:05 -080052 "@python_repo//:scipy",
Brian Silverman6470f442018-08-05 12:08:16 -070053 ],
Austin Schuh572ff402015-11-08 12:17:50 -080054)
Brian Silverman9c89c0a2016-01-08 01:04:57 -080055
56py_test(
Brian Silverman6470f442018-08-05 12:08:16 -070057 name = "polytope_test",
58 srcs = [
59 "polytope_test.py",
60 ],
61 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080062 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070063 deps = [
64 ":controls",
65 ":python_init",
66 ],
Brian Silverman9c89c0a2016-01-08 01:04:57 -080067)
Brian Silverman69120d72016-03-08 16:56:16 -050068
69py_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070070 name = "down_estimator",
71 srcs = [
72 "down_estimator.py",
73 ],
74 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080075 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070076 deps = [
77 ":controls",
78 ":python_init",
Austin Schuh085eab92020-11-26 13:54:51 -080079 "@matplotlib_repo//:matplotlib3",
Brian Silverman6470f442018-08-05 12:08:16 -070080 ],
Brian Silverman69120d72016-03-08 16:56:16 -050081)
Campbell Crowley33e0e3d2017-12-27 17:55:40 -080082
83py_library(
Brian Silverman6470f442018-08-05 12:08:16 -070084 name = "drivetrain",
85 srcs = [
86 "drivetrain.py",
87 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080088 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070089 deps = [
90 ":controls",
91 ":python_init",
Austin Schuh085eab92020-11-26 13:54:51 -080092 "@matplotlib_repo//:matplotlib3",
Brian Silverman6470f442018-08-05 12:08:16 -070093 ],
Campbell Crowley33e0e3d2017-12-27 17:55:40 -080094)
95
96py_library(
Alex Perry20762632019-01-21 17:48:02 -050097 name = "libspline",
98 srcs = [
99 "libspline.py",
100 ],
101 data = [
Alex Perrya60da442019-01-21 19:00:27 -0500102 "//frc971/control_loops/drivetrain:spline.so",
Alex Perry20762632019-01-21 17:48:02 -0500103 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800104 target_compatible_with = ["@platforms//os:linux"],
Alex Perry50baefc2019-01-27 13:26:29 -0800105 deps = [
106 ":python_init",
107 ],
Alex Perry20762632019-01-21 17:48:02 -0500108)
109
Alex Perrya60da442019-01-21 19:00:27 -0500110py_test(
111 name = "lib_spline_test",
112 srcs = [
113 "lib_spline_test.py",
114 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800115 target_compatible_with = ["@platforms//os:linux"],
Alex Perrya60da442019-01-21 19:00:27 -0500116 deps = [
117 ":libspline",
Alex Perry50baefc2019-01-27 13:26:29 -0800118 ":python_init",
Philipp Schrader092a62d2021-12-05 23:15:05 -0800119 "@python_repo//:numpy",
Tyler Chatow12581562019-01-26 20:42:42 -0800120 ],
Alex Perrya60da442019-01-21 19:00:27 -0500121)
122
Alex Perry20762632019-01-21 17:48:02 -0500123py_library(
Brian Silverman6470f442018-08-05 12:08:16 -0700124 name = "polydrivetrain",
125 srcs = [
126 "polydrivetrain.py",
127 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800128 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -0700129 deps = [
130 ":controls",
131 ":drivetrain",
132 ":python_init",
133 "//external:python-glog",
Austin Schuhcd1f7252021-09-24 21:11:43 -0700134 "@matplotlib_repo//:matplotlib3",
Brian Silverman6470f442018-08-05 12:08:16 -0700135 ],
136)
137
138py_library(
139 name = "python_init",
140 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800141 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700142 visibility = ["//visibility:public"],
143 deps = ["//frc971/control_loops:python_init"],
Campbell Crowley33e0e3d2017-12-27 17:55:40 -0800144)
Austin Schuh35d19872018-11-30 15:50:47 +1100145
Austin Schuhb5d302f2019-01-20 20:51:19 -0800146py_library(
147 name = "linear_system",
148 srcs = ["linear_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800149 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhb5d302f2019-01-20 20:51:19 -0800150 visibility = ["//visibility:public"],
151 deps = [
152 ":controls",
153 "//aos/util:py_trapezoid_profile",
154 "//frc971/control_loops:python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800155 "@matplotlib_repo//:matplotlib3",
Austin Schuhb5d302f2019-01-20 20:51:19 -0800156 ],
157)
Austin Schuh2e554032019-01-21 15:07:27 -0800158
159py_library(
160 name = "angular_system",
161 srcs = ["angular_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800162 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuh2e554032019-01-21 15:07:27 -0800163 visibility = ["//visibility:public"],
164 deps = [
165 ":controls",
166 "//aos/util:py_trapezoid_profile",
167 "//frc971/control_loops:python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800168 "@matplotlib_repo//:matplotlib3",
Austin Schuh2e554032019-01-21 15:07:27 -0800169 ],
170)
johnp55310b82019-01-26 18:26:24 -0800171
172py_binary(
John Park91e69732019-03-03 13:12:43 -0800173 name = "spline_graph",
johnp55310b82019-01-26 18:26:24 -0800174 srcs = [
Austin Schuha4f69d62020-02-28 13:58:14 -0800175 "graph.py",
Ravago Jonesfa8da562022-07-02 18:10:22 -0700176 "multispline.py",
Tyler Chatow12581562019-01-26 20:42:42 -0800177 "path_edit.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800178 "spline_drawing.py",
John Park91e69732019-03-03 13:12:43 -0800179 "spline_graph.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800180 "spline_writer.py",
johnp55310b82019-01-26 18:26:24 -0800181 ],
Ravago Jonesc26b9162021-06-30 20:12:48 -0700182 data = glob([
183 "field_images/*.png",
184 "field_images/*.svg",
185 ]),
John Park91e69732019-03-03 13:12:43 -0800186 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800187 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800188 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800189 deps = [
Austin Schuha4f69d62020-02-28 13:58:14 -0800190 ":basic_window",
Philipp Schrader26147542023-01-03 01:44:07 -0800191 ":color",
192 ":constants",
193 ":drawing_constants",
johnp55310b82019-01-26 18:26:24 -0800194 ":libspline",
Tyler Chatow12581562019-01-26 20:42:42 -0800195 ":python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800196 "@matplotlib_repo//:matplotlib3",
Austin Schuha4f69d62020-02-28 13:58:14 -0800197 "@python_gtk",
johnp55310b82019-01-26 18:26:24 -0800198 ],
199)
200
201py_library(
202 name = "basic_window",
203 srcs = [
204 "basic_window.py",
johnp55310b82019-01-26 18:26:24 -0800205 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800206 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800207 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800208 deps = [
Philipp Schrader26147542023-01-03 01:44:07 -0800209 ":constants",
johnp55310b82019-01-26 18:26:24 -0800210 ":python_init",
211 "@python_gtk",
212 ],
213)
Andrew Runke6842bf92019-01-26 15:38:25 -0800214
215py_library(
216 name = "color",
217 srcs = [
218 "color.py",
219 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800220 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800221 visibility = ["//visibility:public"],
Andrew Runke6842bf92019-01-26 15:38:25 -0800222 deps = [
223 ":python_init",
224 ],
225)
Tyler Chatow12581562019-01-26 20:42:42 -0800226
227py_binary(
228 name = "static_zeroing_single_dof_profiled_subsystem_test",
229 srcs = [
230 "static_zeroing_single_dof_profiled_subsystem_test.py",
231 ],
232 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800233 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800234 deps = [
235 ":controls",
236 ":linear_system",
237 ":python_init",
238 "//external:python-gflags",
239 "//external:python-glog",
240 ],
241)