blob: 7851397f959065f891f209e46f1666a737858b70 [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",
James Kuszmaul910f92b2020-01-01 15:30:38 -080014 "@matplotlib_repo//:matplotlib2.7",
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",
35 "@slycot_repo//:slycot",
36 ],
Austin Schuh572ff402015-11-08 12:17:50 -080037)
Brian Silverman9c89c0a2016-01-08 01:04:57 -080038
39py_test(
Brian Silverman6470f442018-08-05 12:08:16 -070040 name = "polytope_test",
41 srcs = [
42 "polytope_test.py",
43 ],
44 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080045 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070046 deps = [
47 ":controls",
48 ":python_init",
49 ],
Brian Silverman9c89c0a2016-01-08 01:04:57 -080050)
Brian Silverman69120d72016-03-08 16:56:16 -050051
52py_binary(
Brian Silverman6470f442018-08-05 12:08:16 -070053 name = "down_estimator",
54 srcs = [
55 "down_estimator.py",
56 ],
57 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080058 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070059 deps = [
60 ":controls",
61 ":python_init",
James Kuszmaul910f92b2020-01-01 15:30:38 -080062 "@matplotlib_repo//:matplotlib2.7",
Brian Silverman6470f442018-08-05 12:08:16 -070063 ],
Brian Silverman69120d72016-03-08 16:56:16 -050064)
Campbell Crowley33e0e3d2017-12-27 17:55:40 -080065
66py_library(
Brian Silverman6470f442018-08-05 12:08:16 -070067 name = "drivetrain",
68 srcs = [
69 "drivetrain.py",
70 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080071 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070072 deps = [
73 ":controls",
74 ":python_init",
James Kuszmaul910f92b2020-01-01 15:30:38 -080075 "@matplotlib_repo//:matplotlib2.7",
Brian Silverman6470f442018-08-05 12:08:16 -070076 ],
Campbell Crowley33e0e3d2017-12-27 17:55:40 -080077)
78
79py_library(
Alex Perry20762632019-01-21 17:48:02 -050080 name = "libspline",
81 srcs = [
82 "libspline.py",
83 ],
84 data = [
Alex Perrya60da442019-01-21 19:00:27 -050085 "//frc971/control_loops/drivetrain:spline.so",
Alex Perry20762632019-01-21 17:48:02 -050086 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080087 target_compatible_with = ["@platforms//os:linux"],
Alex Perry50baefc2019-01-27 13:26:29 -080088 deps = [
89 ":python_init",
90 ],
Alex Perry20762632019-01-21 17:48:02 -050091)
92
Alex Perrya60da442019-01-21 19:00:27 -050093py_test(
94 name = "lib_spline_test",
95 srcs = [
96 "lib_spline_test.py",
97 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080098 target_compatible_with = ["@platforms//os:linux"],
Alex Perrya60da442019-01-21 19:00:27 -050099 deps = [
100 ":libspline",
Alex Perry50baefc2019-01-27 13:26:29 -0800101 ":python_init",
Tyler Chatow12581562019-01-26 20:42:42 -0800102 ],
Alex Perrya60da442019-01-21 19:00:27 -0500103)
104
Alex Perry20762632019-01-21 17:48:02 -0500105py_library(
Brian Silverman6470f442018-08-05 12:08:16 -0700106 name = "polydrivetrain",
107 srcs = [
108 "polydrivetrain.py",
109 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800110 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -0700111 deps = [
112 ":controls",
113 ":drivetrain",
114 ":python_init",
115 "//external:python-glog",
116 ],
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
127py_binary(
128 name = "spline",
129 srcs = [
130 "spline.py",
131 ],
132 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800133 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuh35d19872018-11-30 15:50:47 +1100134 deps = [
135 "//external:python-gflags",
136 "//external:python-glog",
137 "//frc971/control_loops/python:controls",
Austin Schuh7b1e9df2018-12-19 18:04:41 +1100138 "//y2016/control_loops/python:polydrivetrain_lib",
James Kuszmaul910f92b2020-01-01 15:30:38 -0800139 "@matplotlib_repo//:matplotlib2.7",
Austin Schuh35d19872018-11-30 15:50:47 +1100140 ],
141)
Austin Schuhb5d302f2019-01-20 20:51:19 -0800142
143py_library(
144 name = "linear_system",
145 srcs = ["linear_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800146 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhb5d302f2019-01-20 20:51:19 -0800147 visibility = ["//visibility:public"],
148 deps = [
149 ":controls",
150 "//aos/util:py_trapezoid_profile",
151 "//frc971/control_loops:python_init",
James Kuszmaul910f92b2020-01-01 15:30:38 -0800152 "@matplotlib_repo//:matplotlib2.7",
Austin Schuhb5d302f2019-01-20 20:51:19 -0800153 ],
154)
Austin Schuh2e554032019-01-21 15:07:27 -0800155
156py_library(
157 name = "angular_system",
158 srcs = ["angular_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800159 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuh2e554032019-01-21 15:07:27 -0800160 visibility = ["//visibility:public"],
161 deps = [
162 ":controls",
163 "//aos/util:py_trapezoid_profile",
164 "//frc971/control_loops:python_init",
James Kuszmaul910f92b2020-01-01 15:30:38 -0800165 "@matplotlib_repo//:matplotlib2.7",
Austin Schuh2e554032019-01-21 15:07:27 -0800166 ],
167)
johnp55310b82019-01-26 18:26:24 -0800168
169py_binary(
John Park91e69732019-03-03 13:12:43 -0800170 name = "spline_graph",
johnp55310b82019-01-26 18:26:24 -0800171 srcs = [
Andrew Runke6842bf92019-01-26 15:38:25 -0800172 "color.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800173 "graph.py",
Tyler Chatow12581562019-01-26 20:42:42 -0800174 "path_edit.py",
John Park91e69732019-03-03 13:12:43 -0800175 "points.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800176 "spline_drawing.py",
John Park91e69732019-03-03 13:12:43 -0800177 "spline_graph.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800178 "spline_writer.py",
johnp55310b82019-01-26 18:26:24 -0800179 ],
John Park91e69732019-03-03 13:12:43 -0800180 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800181 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800182 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800183 deps = [
Austin Schuha4f69d62020-02-28 13:58:14 -0800184 ":basic_window",
johnp55310b82019-01-26 18:26:24 -0800185 ":libspline",
Tyler Chatow12581562019-01-26 20:42:42 -0800186 ":python_init",
John Park91e69732019-03-03 13:12:43 -0800187 "@matplotlib_repo//:matplotlib2.7",
Austin Schuha4f69d62020-02-28 13:58:14 -0800188 "@python_gtk",
johnp55310b82019-01-26 18:26:24 -0800189 ],
190)
191
192py_library(
193 name = "basic_window",
194 srcs = [
195 "basic_window.py",
Tyler Chatow12581562019-01-26 20:42:42 -0800196 "color.py",
johnp55310b82019-01-26 18:26:24 -0800197 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800198 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800199 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800200 deps = [
201 ":python_init",
202 "@python_gtk",
203 ],
204)
Andrew Runke6842bf92019-01-26 15:38:25 -0800205
206py_library(
207 name = "color",
208 srcs = [
209 "color.py",
210 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800211 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800212 visibility = ["//visibility:public"],
Andrew Runke6842bf92019-01-26 15:38:25 -0800213 deps = [
214 ":python_init",
215 ],
216)
Tyler Chatow12581562019-01-26 20:42:42 -0800217
218py_binary(
219 name = "static_zeroing_single_dof_profiled_subsystem_test",
220 srcs = [
221 "static_zeroing_single_dof_profiled_subsystem_test.py",
222 ],
223 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800224 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800225 deps = [
226 ":controls",
227 ":linear_system",
228 ":python_init",
229 "//external:python-gflags",
230 "//external:python-glog",
231 ],
232)