blob: f3dcb48dc9d1097dd444cc665307f73453255874 [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",
Brian Silverman6470f442018-08-05 12:08:16 -070029 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080030 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -070031 deps = [
32 ":python_init",
33 "//external:python-glog",
Philipp Schrader092a62d2021-12-05 23:15:05 -080034 "@python_repo//:scipy",
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",
Philipp Schrader092a62d2021-12-05 23:15:05 -0800101 "@python_repo//:numpy",
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",
Austin Schuhcd1f7252021-09-24 21:11:43 -0700116 "@matplotlib_repo//:matplotlib3",
Brian Silverman6470f442018-08-05 12:08:16 -0700117 ],
118)
119
120py_library(
121 name = "python_init",
122 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800123 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700124 visibility = ["//visibility:public"],
125 deps = ["//frc971/control_loops:python_init"],
Campbell Crowley33e0e3d2017-12-27 17:55:40 -0800126)
Austin Schuh35d19872018-11-30 15:50:47 +1100127
Austin Schuhb5d302f2019-01-20 20:51:19 -0800128py_library(
129 name = "linear_system",
130 srcs = ["linear_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800131 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhb5d302f2019-01-20 20:51:19 -0800132 visibility = ["//visibility:public"],
133 deps = [
134 ":controls",
135 "//aos/util:py_trapezoid_profile",
136 "//frc971/control_loops:python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800137 "@matplotlib_repo//:matplotlib3",
Austin Schuhb5d302f2019-01-20 20:51:19 -0800138 ],
139)
Austin Schuh2e554032019-01-21 15:07:27 -0800140
141py_library(
142 name = "angular_system",
143 srcs = ["angular_system.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800144 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuh2e554032019-01-21 15:07:27 -0800145 visibility = ["//visibility:public"],
146 deps = [
147 ":controls",
148 "//aos/util:py_trapezoid_profile",
149 "//frc971/control_loops:python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800150 "@matplotlib_repo//:matplotlib3",
Austin Schuh2e554032019-01-21 15:07:27 -0800151 ],
152)
johnp55310b82019-01-26 18:26:24 -0800153
154py_binary(
John Park91e69732019-03-03 13:12:43 -0800155 name = "spline_graph",
johnp55310b82019-01-26 18:26:24 -0800156 srcs = [
Andrew Runke6842bf92019-01-26 15:38:25 -0800157 "color.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800158 "graph.py",
Ravago Jonesfa8da562022-07-02 18:10:22 -0700159 "multispline.py",
Tyler Chatow12581562019-01-26 20:42:42 -0800160 "path_edit.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800161 "spline_drawing.py",
John Park91e69732019-03-03 13:12:43 -0800162 "spline_graph.py",
Austin Schuha4f69d62020-02-28 13:58:14 -0800163 "spline_writer.py",
johnp55310b82019-01-26 18:26:24 -0800164 ],
Ravago Jonesc26b9162021-06-30 20:12:48 -0700165 data = glob([
166 "field_images/*.png",
167 "field_images/*.svg",
168 ]),
John Park91e69732019-03-03 13:12:43 -0800169 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800170 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800171 visibility = ["//visibility:public"],
johnp55310b82019-01-26 18:26:24 -0800172 deps = [
Austin Schuha4f69d62020-02-28 13:58:14 -0800173 ":basic_window",
johnp55310b82019-01-26 18:26:24 -0800174 ":libspline",
Tyler Chatow12581562019-01-26 20:42:42 -0800175 ":python_init",
Austin Schuh085eab92020-11-26 13:54:51 -0800176 "@matplotlib_repo//:matplotlib3",
Austin Schuha4f69d62020-02-28 13:58:14 -0800177 "@python_gtk",
johnp55310b82019-01-26 18:26:24 -0800178 ],
179)
180
181py_library(
182 name = "basic_window",
183 srcs = [
184 "basic_window.py",
Tyler Chatow12581562019-01-26 20:42:42 -0800185 "color.py",
johnp55310b82019-01-26 18:26:24 -0800186 ],
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 = [
190 ":python_init",
191 "@python_gtk",
192 ],
193)
Andrew Runke6842bf92019-01-26 15:38:25 -0800194
195py_library(
196 name = "color",
197 srcs = [
198 "color.py",
199 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800200 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800201 visibility = ["//visibility:public"],
Andrew Runke6842bf92019-01-26 15:38:25 -0800202 deps = [
203 ":python_init",
204 ],
205)
Tyler Chatow12581562019-01-26 20:42:42 -0800206
207py_binary(
208 name = "static_zeroing_single_dof_profiled_subsystem_test",
209 srcs = [
210 "static_zeroing_single_dof_profiled_subsystem_test.py",
211 ],
212 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800213 target_compatible_with = ["@platforms//cpu:x86_64"],
Tyler Chatow12581562019-01-26 20:42:42 -0800214 deps = [
215 ":controls",
216 ":linear_system",
217 ":python_init",
218 "//external:python-gflags",
219 "//external:python-glog",
220 ],
221)