blob: 880624efd279224f453eb561eaf1da80c55d6716 [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",
115 ],
116)
117
118py_library(
119 name = "python_init",
120 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800121 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700122 visibility = ["//visibility:public"],
123 deps = ["//frc971/control_loops:python_init"],
Campbell Crowley33e0e3d2017-12-27 17:55:40 -0800124)
Austin Schuh35d19872018-11-30 15:50:47 +1100125
126py_binary(
127 name = "spline",
128 srcs = [
129 "spline.py",
130 ],
131 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800132 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuh35d19872018-11-30 15:50:47 +1100133 deps = [
134 "//external:python-gflags",
135 "//external:python-glog",
136 "//frc971/control_loops/python:controls",
Austin Schuh7b1e9df2018-12-19 18:04:41 +1100137 "//y2016/control_loops/python:polydrivetrain_lib",
Austin Schuh085eab92020-11-26 13:54:51 -0800138 "@matplotlib_repo//:matplotlib3",
Austin Schuh35d19872018-11-30 15:50:47 +1100139 ],
140)
Austin Schuhb5d302f2019-01-20 20:51:19 -0800141
142py_library(
143 name = "linear_system",
144 srcs = ["linear_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800145 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhb5d302f2019-01-20 20:51:19 -0800146 visibility = ["//visibility:public"],
147 deps = [
148 ":controls",
149 "//aos/util:py_trapezoid_profile",
150 "//frc971/control_loops:python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800151 "@matplotlib_repo//:matplotlib3",
Austin Schuhb5d302f2019-01-20 20:51:19 -0800152 ],
153)
Austin Schuh2e554032019-01-21 15:07:27 -0800154
155py_library(
156 name = "angular_system",
157 srcs = ["angular_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800158 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuh2e554032019-01-21 15:07:27 -0800159 visibility = ["//visibility:public"],
160 deps = [
161 ":controls",
162 "//aos/util:py_trapezoid_profile",
163 "//frc971/control_loops:python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800164 "@matplotlib_repo//:matplotlib3",
Austin Schuh2e554032019-01-21 15:07:27 -0800165 ],
166)
johnp55310b82019-01-26 18:26:24 -0800167
168py_binary(
John Park91e69732019-03-03 13:12:43 -0800169 name = "spline_graph",
johnp55310b82019-01-26 18:26:24 -0800170 srcs = [
Andrew Runke6842bf92019-01-26 15:38:25 -0800171 "color.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800172 "graph.py",
Tyler Chatow12581562019-01-26 20:42:42 -0800173 "path_edit.py",
John Park91e69732019-03-03 13:12:43 -0800174 "points.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800175 "spline_drawing.py",
John Park91e69732019-03-03 13:12:43 -0800176 "spline_graph.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800177 "spline_writer.py",
johnp55310b82019-01-26 18:26:24 -0800178 ],
John Park91e69732019-03-03 13:12:43 -0800179 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800180 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800181 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800182 deps = [
Austin Schuha4f69d62020-02-28 13:58:14 -0800183 ":basic_window",
johnp55310b82019-01-26 18:26:24 -0800184 ":libspline",
Tyler Chatow12581562019-01-26 20:42:42 -0800185 ":python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800186 "@matplotlib_repo//:matplotlib3",
Austin Schuha4f69d62020-02-28 13:58:14 -0800187 "@python_gtk",
johnp55310b82019-01-26 18:26:24 -0800188 ],
189)
190
191py_library(
192 name = "basic_window",
193 srcs = [
194 "basic_window.py",
Tyler Chatow12581562019-01-26 20:42:42 -0800195 "color.py",
johnp55310b82019-01-26 18:26:24 -0800196 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800197 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800198 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800199 deps = [
200 ":python_init",
201 "@python_gtk",
202 ],
203)
Andrew Runke6842bf92019-01-26 15:38:25 -0800204
205py_library(
206 name = "color",
207 srcs = [
208 "color.py",
209 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800210 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800211 visibility = ["//visibility:public"],
Andrew Runke6842bf92019-01-26 15:38:25 -0800212 deps = [
213 ":python_init",
214 ],
215)
Tyler Chatow12581562019-01-26 20:42:42 -0800216
217py_binary(
218 name = "static_zeroing_single_dof_profiled_subsystem_test",
219 srcs = [
220 "static_zeroing_single_dof_profiled_subsystem_test.py",
221 ],
222 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800223 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800224 deps = [
225 ":controls",
226 ":linear_system",
227 ":python_init",
228 "//external:python-gflags",
229 "//external:python-glog",
230 ],
231)