blob: 1f29601631191e0c667eca307da561ede2c1b240 [file] [log] [blame]
Austin Schuhfc0837a2018-02-11 14:56:43 -08001package(default_visibility = ["//y2018:__subpackages__"])
Sabina Davisf4c5e762018-01-24 10:18:43 -08002
3py_binary(
Austin Schuhfc0837a2018-02-11 14:56:43 -08004 name = "drivetrain",
5 srcs = [
6 "drivetrain.py",
7 ],
Brian Silverman6470f442018-08-05 12:08:16 -07008 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -08009 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhfc0837a2018-02-11 14:56:43 -080010 deps = [
Brian Silverman6470f442018-08-05 12:08:16 -070011 ":python_init",
Austin Schuhfc0837a2018-02-11 14:56:43 -080012 "//external:python-gflags",
13 "//external:python-glog",
14 "//frc971/control_loops/python:drivetrain",
15 ],
Sabina Davisf4c5e762018-01-24 10:18:43 -080016)
17
18py_binary(
Austin Schuhfc0837a2018-02-11 14:56:43 -080019 name = "polydrivetrain",
20 srcs = [
21 "drivetrain.py",
22 "polydrivetrain.py",
23 ],
Brian Silverman6470f442018-08-05 12:08:16 -070024 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080025 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhfc0837a2018-02-11 14:56:43 -080026 deps = [
Brian Silverman6470f442018-08-05 12:08:16 -070027 ":python_init",
Austin Schuhfc0837a2018-02-11 14:56:43 -080028 "//external:python-gflags",
29 "//external:python-glog",
30 "//frc971/control_loops/python:polydrivetrain",
31 ],
Sabina Davisf4c5e762018-01-24 10:18:43 -080032)
33
34py_library(
Austin Schuhfc0837a2018-02-11 14:56:43 -080035 name = "polydrivetrain_lib",
36 srcs = [
37 "drivetrain.py",
38 "polydrivetrain.py",
39 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080040 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuh44aa9142018-12-03 21:07:23 +110041 visibility = ["//visibility:public"],
Austin Schuhfc0837a2018-02-11 14:56:43 -080042 deps = [
Austin Schuh44aa9142018-12-03 21:07:23 +110043 ":python_init",
Austin Schuhfc0837a2018-02-11 14:56:43 -080044 "//external:python-gflags",
45 "//external:python-glog",
46 "//frc971/control_loops/python:controls",
47 "//frc971/control_loops/python:drivetrain",
Austin Schuh44aa9142018-12-03 21:07:23 +110048 "//frc971/control_loops/python:polydrivetrain",
Austin Schuhfc0837a2018-02-11 14:56:43 -080049 ],
Sabina Davisf4c5e762018-01-24 10:18:43 -080050)
51
52py_test(
Austin Schuhfc0837a2018-02-11 14:56:43 -080053 name = "polydrivetrain_test",
54 srcs = [
55 "polydrivetrain_test.py",
56 ],
Brian Silverman6470f442018-08-05 12:08:16 -070057 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080058 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhfc0837a2018-02-11 14:56:43 -080059 deps = [
60 ":polydrivetrain_lib",
Brian Silverman6470f442018-08-05 12:08:16 -070061 ":python_init",
Austin Schuhfc0837a2018-02-11 14:56:43 -080062 "//external:python-gflags",
63 "//external:python-glog",
64 "//frc971/control_loops/python:controls",
65 "//frc971/control_loops/python:polydrivetrain",
66 ],
Sabina Davisf4c5e762018-01-24 10:18:43 -080067)
Austin Schuhf173eb82018-01-20 23:32:30 -080068
69py_binary(
Austin Schuhfc0837a2018-02-11 14:56:43 -080070 name = "arm_trajectory",
71 srcs = [
72 "arm_trajectory.py",
73 "path_points.py",
74 ],
Brian Silverman6470f442018-08-05 12:08:16 -070075 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080076 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhfc0837a2018-02-11 14:56:43 -080077 deps = [
Brian Silverman6470f442018-08-05 12:08:16 -070078 ":python_init",
Austin Schuhfc0837a2018-02-11 14:56:43 -080079 "//external:python-gflags",
80 "//external:python-glog",
81 "//frc971/control_loops/python:controls",
82 ],
83)
84
85py_binary(
86 name = "intake",
87 srcs = [
88 "intake.py",
89 ],
Brian Silverman6470f442018-08-05 12:08:16 -070090 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -080091 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhfc0837a2018-02-11 14:56:43 -080092 deps = [
Brian Silverman6470f442018-08-05 12:08:16 -070093 ":python_init",
Austin Schuhfc0837a2018-02-11 14:56:43 -080094 "//external:python-gflags",
95 "//external:python-glog",
96 "//frc971/control_loops/python:controls",
James Kuszmaul910f92b2020-01-01 15:30:38 -080097 "@matplotlib_repo//:matplotlib2.7",
Austin Schuhfc0837a2018-02-11 14:56:43 -080098 ],
Austin Schuhf173eb82018-01-20 23:32:30 -080099)
Austin Schuhf8f95022018-01-28 20:01:10 -0800100
Austin Schuhad596222018-01-31 23:34:03 -0800101cc_library(
Brian Silverman16a923c2018-10-31 19:40:51 -0700102 name = "dlqr",
103 hdrs = [
104 "dlqr.h",
105 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800106 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhad596222018-01-31 23:34:03 -0800107 deps = [
Brian Silverman16a923c2018-10-31 19:40:51 -0700108 "@slycot_repo//:slicot",
109 ],
Austin Schuhad596222018-01-31 23:34:03 -0800110)
111
Austin Schuhf8f95022018-01-28 20:01:10 -0800112cc_binary(
113 name = "arm_mpc",
114 srcs = [
115 "arm_mpc.cc",
116 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800117 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhad596222018-01-31 23:34:03 -0800118 deps = [
119 ":arm_bounds",
Brian Silverman16a923c2018-10-31 19:40:51 -0700120 ":dlqr",
Austin Schuhad596222018-01-31 23:34:03 -0800121 "//third_party/ct",
Austin Schuhad596222018-01-31 23:34:03 -0800122 "//third_party/matplotlib-cpp",
123 "@cgal_repo//:cgal",
Brian Silverman16a923c2018-10-31 19:40:51 -0700124 "@com_github_gflags_gflags//:gflags",
Austin Schuhad596222018-01-31 23:34:03 -0800125 ],
Austin Schuhad596222018-01-31 23:34:03 -0800126)
127
128cc_binary(
129 name = "3d_plot",
130 srcs = [
131 "3d_plot.cc",
132 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800133 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhf8f95022018-01-28 20:01:10 -0800134 deps = [
Austin Schuhad596222018-01-31 23:34:03 -0800135 ":arm_bounds",
Austin Schuhad596222018-01-31 23:34:03 -0800136 "//third_party/matplotlib-cpp",
Brian Silverman16a923c2018-10-31 19:40:51 -0700137 "@com_github_gflags_gflags//:gflags",
Austin Schuhad596222018-01-31 23:34:03 -0800138 ],
139)
140
141cc_library(
142 name = "arm_bounds",
143 srcs = [
144 "arm_bounds.cc",
145 ],
146 hdrs = [
147 "arm_bounds.h",
148 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800149 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhad596222018-01-31 23:34:03 -0800150 deps = [
Austin Schuhad596222018-01-31 23:34:03 -0800151 "@cgal_repo//:cgal",
Alex Perrycb7da4b2019-08-28 19:35:56 -0700152 "@org_tuxfamily_eigen//:eigen",
Austin Schuhad596222018-01-31 23:34:03 -0800153 ],
154)
155
156cc_binary(
157 name = "2d_plot",
158 srcs = [
159 "2d_plot.cc",
160 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800161 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuhad596222018-01-31 23:34:03 -0800162 deps = [
Austin Schuhfc0837a2018-02-11 14:56:43 -0800163 "//third_party/matplotlib-cpp",
Brian Silverman16a923c2018-10-31 19:40:51 -0700164 "@com_github_gflags_gflags//:gflags",
Austin Schuhf8f95022018-01-28 20:01:10 -0800165 ],
Austin Schuhf8f95022018-01-28 20:01:10 -0800166)
Parker Schuhdc682952018-03-03 18:24:01 -0800167
168py_binary(
169 name = "graph_edit",
170 srcs = [
Parker Schuhdc682952018-03-03 18:24:01 -0800171 "graph_edit.py",
172 "graph_generate.py",
173 ],
Brian Silverman6470f442018-08-05 12:08:16 -0700174 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800175 python_version = "PY3",
Parker Schuhdc682952018-03-03 18:24:01 -0800176 srcs_version = "PY3",
Philipp Schraderdada1072020-11-24 11:34:46 -0800177 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman6470f442018-08-05 12:08:16 -0700178 deps = [
Alex Perrycb7da4b2019-08-28 19:35:56 -0700179 ":python_init",
johnp55310b82019-01-26 18:26:24 -0800180 "//frc971/control_loops/python:basic_window",
Andrew Runke6842bf92019-01-26 15:38:25 -0800181 "//frc971/control_loops/python:color",
Brian Silvermandd1aa462018-12-12 20:14:51 -0800182 "@python_gtk",
Brian Silverman6470f442018-08-05 12:08:16 -0700183 ],
Parker Schuhdc682952018-03-03 18:24:01 -0800184)
Austin Schuh7dfccf62018-03-03 21:28:14 -0800185
186py_binary(
187 name = "graph_codegen",
188 srcs = [
189 "graph_codegen.py",
190 "graph_generate.py",
191 ],
Brian Silverman6470f442018-08-05 12:08:16 -0700192 legacy_create_init = False,
Philipp Schraderdada1072020-11-24 11:34:46 -0800193 python_version = "PY2",
Austin Schuh7dfccf62018-03-03 21:28:14 -0800194 srcs_version = "PY2",
Philipp Schraderdada1072020-11-24 11:34:46 -0800195 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700196 deps = [
197 ":python_init",
198 ],
199)
200
201py_library(
202 name = "python_init",
203 srcs = ["__init__.py"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800204 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700205 visibility = ["//visibility:public"],
206 deps = ["//y2018/control_loops:python_init"],
Austin Schuh7dfccf62018-03-03 21:28:14 -0800207)
Austin Schuh434c8372018-01-21 16:30:06 -0800208
209py_binary(
210 name = "extended_lqr",
211 srcs = [
212 "extended_lqr.py",
213 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800214 target_compatible_with = ["@platforms//cpu:x86_64"],
Austin Schuh434c8372018-01-21 16:30:06 -0800215 deps = [
216 "//external:python-gflags",
217 "//external:python-glog",
218 "//frc971/control_loops/python:controls",
219 ],
220)
Austin Schuh404e17f2018-01-24 19:32:10 -0800221
222py_binary(
Brian Silverman16a923c2018-10-31 19:40:51 -0700223 name = "arm_mpc_py",
224 srcs = [
225 "arm_mpc.py",
226 ],
227 main = "arm_mpc.py",
Philipp Schraderdada1072020-11-24 11:34:46 -0800228 target_compatible_with = ["@platforms//cpu:x86_64"],
Brian Silverman16a923c2018-10-31 19:40:51 -0700229 deps = [
230 "//external:python-gflags",
231 "//external:python-glog",
232 "//frc971/control_loops/python:controls",
233 ],
Austin Schuh404e17f2018-01-24 19:32:10 -0800234)