blob: a4b8fb8dc2d587803f8f6d0426f0543512299eda [file] [log] [blame]
Brian Silverman6470f442018-08-05 12:08:16 -07001package(default_visibility = ["//visibility:public"])
Austin Schuh572ff402015-11-08 12:17:50 -08002
Brian Silverman6260c092018-01-14 15:21:36 -08003py_binary(
Brian Silverman6470f442018-08-05 12:08:16 -07004 name = "haptic_wheel",
5 srcs = [
6 "haptic_wheel.py",
7 ],
8 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -08009 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070010 deps = [
11 "//external:python-gflags",
12 "//external:python-glog",
13 "//frc971/control_loops/python:controls",
Austin Schuh085eab92020-11-26 13:54:51 -080014 "@matplotlib_repo//:matplotlib3",
Brian Silverman6470f442018-08-05 12:08:16 -070015 ],
Brian Silverman6260c092018-01-14 15:21:36 -080016)
17
Austin Schuh572ff402015-11-08 12:17:50 -080018py_library(
Brian Silverman6470f442018-08-05 12:08:16 -070019 name = "controls",
20 srcs = [
21 "cim.py",
22 "control_loop.py",
23 "controls.py",
24 "libcdd.py",
25 "polytope.py",
26 ],
27 data = [
28 "//third_party/cddlib:_cddlib.so",
29 "@python_repo//:scipy",
30 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080031 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070032 deps = [
33 ":python_init",
34 "//external:python-glog",
Brian Silverman6470f442018-08-05 12:08:16 -070035 ],
Austin Schuh572ff402015-11-08 12:17:50 -080036)
Brian Silverman9c89c0a2016-01-08 01:04:57 -080037
38py_test(
Brian Silverman6470f442018-08-05 12:08:16 -070039 name = "polytope_test",
40 srcs = [
41 "polytope_test.py",
42 ],
43 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080044 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070045 deps = [
46 ":controls",
47 ":python_init",
48 ],
Brian Silverman9c89c0a2016-01-08 01:04:57 -080049)
Brian Silverman69120d72016-03-08 16:56:16 -050050
51py_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070052 name = "down_estimator",
53 srcs = [
54 "down_estimator.py",
55 ],
56 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080057 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070058 deps = [
59 ":controls",
60 ":python_init",
Austin Schuh085eab92020-11-26 13:54:51 -080061 "@matplotlib_repo//:matplotlib3",
Brian Silverman6470f442018-08-05 12:08:16 -070062 ],
Brian Silverman69120d72016-03-08 16:56:16 -050063)
Campbell Crowley33e0e3d2017-12-27 17:55:40 -080064
65py_library(
Brian Silverman6470f442018-08-05 12:08:16 -070066 name = "drivetrain",
67 srcs = [
68 "drivetrain.py",
69 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080070 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070071 deps = [
72 ":controls",
73 ":python_init",
Austin Schuh085eab92020-11-26 13:54:51 -080074 "@matplotlib_repo//:matplotlib3",
Brian Silverman6470f442018-08-05 12:08:16 -070075 ],
Campbell Crowley33e0e3d2017-12-27 17:55:40 -080076)
77
78py_library(
Alex Perry20762632019-01-21 17:48:02 -050079 name = "libspline",
80 srcs = [
81 "libspline.py",
82 ],
83 data = [
Alex Perrya60da442019-01-21 19:00:27 -050084 "//frc971/control_loops/drivetrain:spline.so",
Alex Perry20762632019-01-21 17:48:02 -050085 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080086 target_compatible_with = ["@platforms//os:linux"],
Alex Perry50baefc2019-01-27 13:26:29 -080087 deps = [
88 ":python_init",
89 ],
Alex Perry20762632019-01-21 17:48:02 -050090)
91
Alex Perrya60da442019-01-21 19:00:27 -050092py_test(
93 name = "lib_spline_test",
94 srcs = [
95 "lib_spline_test.py",
96 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080097 target_compatible_with = ["@platforms//os:linux"],
Alex Perrya60da442019-01-21 19:00:27 -050098 deps = [
99 ":libspline",
Alex Perry50baefc2019-01-27 13:26:29 -0800100 ":python_init",
Tyler Chatow12581562019-01-26 20:42:42 -0800101 ],
Alex Perrya60da442019-01-21 19:00:27 -0500102)
103
Alex Perry20762632019-01-21 17:48:02 -0500104py_library(
Brian Silverman6470f442018-08-05 12:08:16 -0700105 name = "polydrivetrain",
106 srcs = [
107 "polydrivetrain.py",
108 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800109 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -0700110 deps = [
111 ":controls",
112 ":drivetrain",
113 ":python_init",
114 "//external:python-glog",
Austin Schuhcd1f7252021-09-24 21:11:43 -0700115 "@matplotlib_repo//:matplotlib3",
Brian Silverman6470f442018-08-05 12:08:16 -0700116 ],
117)
118
119py_library(
120 name = "python_init",
121 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800122 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700123 visibility = ["//visibility:public"],
124 deps = ["//frc971/control_loops:python_init"],
Campbell Crowley33e0e3d2017-12-27 17:55:40 -0800125)
Austin Schuh35d19872018-11-30 15:50:47 +1100126
Austin Schuhb5d302f2019-01-20 20:51:19 -0800127py_library(
128 name = "linear_system",
129 srcs = ["linear_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800130 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhb5d302f2019-01-20 20:51:19 -0800131 visibility = ["//visibility:public"],
132 deps = [
133 ":controls",
134 "//aos/util:py_trapezoid_profile",
135 "//frc971/control_loops:python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800136 "@matplotlib_repo//:matplotlib3",
Austin Schuhb5d302f2019-01-20 20:51:19 -0800137 ],
138)
Austin Schuh2e554032019-01-21 15:07:27 -0800139
140py_library(
141 name = "angular_system",
142 srcs = ["angular_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800143 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuh2e554032019-01-21 15:07:27 -0800144 visibility = ["//visibility:public"],
145 deps = [
146 ":controls",
147 "//aos/util:py_trapezoid_profile",
148 "//frc971/control_loops:python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800149 "@matplotlib_repo//:matplotlib3",
Austin Schuh2e554032019-01-21 15:07:27 -0800150 ],
151)
johnp55310b82019-01-26 18:26:24 -0800152
153py_binary(
John Park91e69732019-03-03 13:12:43 -0800154 name = "spline_graph",
johnp55310b82019-01-26 18:26:24 -0800155 srcs = [
Andrew Runke6842bf92019-01-26 15:38:25 -0800156 "color.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800157 "graph.py",
Tyler Chatow12581562019-01-26 20:42:42 -0800158 "path_edit.py",
John Park91e69732019-03-03 13:12:43 -0800159 "points.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800160 "spline_drawing.py",
John Park91e69732019-03-03 13:12:43 -0800161 "spline_graph.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800162 "spline_writer.py",
johnp55310b82019-01-26 18:26:24 -0800163 ],
Ravago Jonesc26b9162021-06-30 20:12:48 -0700164 data = glob([
165 "field_images/*.png",
166 "field_images/*.svg",
167 ]),
John Park91e69732019-03-03 13:12:43 -0800168 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800169 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800170 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800171 deps = [
Austin Schuha4f69d62020-02-28 13:58:14 -0800172 ":basic_window",
johnp55310b82019-01-26 18:26:24 -0800173 ":libspline",
Tyler Chatow12581562019-01-26 20:42:42 -0800174 ":python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800175 "@matplotlib_repo//:matplotlib3",
Austin Schuha4f69d62020-02-28 13:58:14 -0800176 "@python_gtk",
johnp55310b82019-01-26 18:26:24 -0800177 ],
178)
179
180py_library(
181 name = "basic_window",
182 srcs = [
183 "basic_window.py",
Tyler Chatow12581562019-01-26 20:42:42 -0800184 "color.py",
johnp55310b82019-01-26 18:26:24 -0800185 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800186 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800187 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800188 deps = [
189 ":python_init",
190 "@python_gtk",
191 ],
192)
Andrew Runke6842bf92019-01-26 15:38:25 -0800193
194py_library(
195 name = "color",
196 srcs = [
197 "color.py",
198 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800199 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800200 visibility = ["//visibility:public"],
Andrew Runke6842bf92019-01-26 15:38:25 -0800201 deps = [
202 ":python_init",
203 ],
204)
Tyler Chatow12581562019-01-26 20:42:42 -0800205
206py_binary(
207 name = "static_zeroing_single_dof_profiled_subsystem_test",
208 srcs = [
209 "static_zeroing_single_dof_profiled_subsystem_test.py",
210 ],
211 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800212 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800213 deps = [
214 ":controls",
215 ":linear_system",
216 ":python_init",
217 "//external:python-gflags",
218 "//external:python-glog",
219 ],
220)