Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 1 | package(default_visibility = ["//visibility:public"]) |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 2 | |
Alex Perry | 2124ae8 | 2020-03-07 14:19:06 -0800 | [diff] [blame] | 3 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library") |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 4 | load("//aos:config.bzl", "aos_config") |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 5 | load("//tools:environments.bzl", "mcu_cpus") |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 6 | load("//tools/build_rules:select.bzl", "compiler_select", "cpu_select") |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 7 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 8 | flatbuffer_cc_library( |
| 9 | name = "drivetrain_goal_fbs", |
| 10 | srcs = ["drivetrain_goal.fbs"], |
| 11 | compatible_with = mcu_cpus, |
| 12 | gen_reflections = 1, |
| 13 | includes = ["//frc971/control_loops:control_loops_fbs_includes"], |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 14 | ) |
| 15 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 16 | flatbuffer_cc_library( |
| 17 | name = "drivetrain_output_fbs", |
| 18 | srcs = ["drivetrain_output.fbs"], |
| 19 | compatible_with = mcu_cpus, |
| 20 | gen_reflections = 1, |
| 21 | ) |
| 22 | |
| 23 | flatbuffer_cc_library( |
| 24 | name = "drivetrain_position_fbs", |
| 25 | srcs = ["drivetrain_position.fbs"], |
| 26 | compatible_with = mcu_cpus, |
| 27 | gen_reflections = 1, |
| 28 | ) |
| 29 | |
| 30 | flatbuffer_cc_library( |
| 31 | name = "drivetrain_status_fbs", |
| 32 | srcs = ["drivetrain_status.fbs"], |
| 33 | compatible_with = mcu_cpus, |
| 34 | gen_reflections = 1, |
| 35 | includes = ["//frc971/control_loops:control_loops_fbs_includes"], |
| 36 | ) |
| 37 | |
Alex Perry | 2124ae8 | 2020-03-07 14:19:06 -0800 | [diff] [blame] | 38 | flatbuffer_ts_library( |
| 39 | name = "drivetrain_status_ts_fbs", |
| 40 | srcs = ["drivetrain_status.fbs"], |
| 41 | includes = ["//frc971/control_loops:control_loops_fbs_includes"], |
| 42 | ) |
| 43 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 44 | genrule( |
| 45 | name = "drivetrain_goal_float_fbs_generated", |
| 46 | srcs = ["drivetrain_goal.fbs"], |
| 47 | outs = ["drivetrain_goal_float.fbs"], |
| 48 | cmd = "cat $(SRCS) | sed 's/double/float/g' > $(OUTS)", |
| 49 | compatible_with = mcu_cpus, |
| 50 | ) |
| 51 | |
| 52 | genrule( |
| 53 | name = "drivetrain_position_float_fbs_generated", |
| 54 | srcs = ["drivetrain_position.fbs"], |
| 55 | outs = ["drivetrain_position_float.fbs"], |
| 56 | cmd = "cat $(SRCS) | sed 's/double/float/g' > $(OUTS)", |
| 57 | compatible_with = mcu_cpus, |
| 58 | ) |
| 59 | |
| 60 | genrule( |
| 61 | name = "drivetrain_output_float_fbs_generated", |
| 62 | srcs = ["drivetrain_output.fbs"], |
| 63 | outs = ["drivetrain_output_float.fbs"], |
| 64 | cmd = "cat $(SRCS) | sed 's/double/float/g' > $(OUTS)", |
| 65 | compatible_with = mcu_cpus, |
| 66 | ) |
| 67 | |
| 68 | genrule( |
| 69 | name = "drivetrain_status_float_fbs_generated", |
| 70 | srcs = ["drivetrain_status.fbs"], |
| 71 | outs = ["drivetrain_status_float.fbs"], |
| 72 | cmd = "cat $(SRCS) | sed 's/double/float/g' > $(OUTS)", |
| 73 | compatible_with = mcu_cpus, |
| 74 | ) |
| 75 | |
| 76 | flatbuffer_cc_library( |
| 77 | name = "drivetrain_goal_float_fbs", |
| 78 | srcs = ["drivetrain_goal_float.fbs"], |
| 79 | compatible_with = mcu_cpus, |
| 80 | gen_reflections = 1, |
| 81 | includes = ["//frc971/control_loops:control_loops_fbs_includes"], |
| 82 | ) |
| 83 | |
| 84 | flatbuffer_cc_library( |
| 85 | name = "drivetrain_output_float_fbs", |
| 86 | srcs = ["drivetrain_output_float.fbs"], |
| 87 | compatible_with = mcu_cpus, |
| 88 | gen_reflections = 1, |
| 89 | ) |
| 90 | |
| 91 | flatbuffer_cc_library( |
| 92 | name = "drivetrain_position_float_fbs", |
| 93 | srcs = ["drivetrain_position_float.fbs"], |
| 94 | compatible_with = mcu_cpus, |
| 95 | gen_reflections = 1, |
| 96 | ) |
| 97 | |
| 98 | flatbuffer_cc_library( |
| 99 | name = "drivetrain_status_float_fbs", |
| 100 | srcs = ["drivetrain_status_float.fbs"], |
| 101 | compatible_with = mcu_cpus, |
| 102 | gen_reflections = 1, |
| 103 | includes = ["//frc971/control_loops:control_loops_fbs_includes"], |
| 104 | ) |
| 105 | |
| 106 | aos_config( |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 107 | name = "simulation_channels", |
| 108 | src = "drivetrain_simulation_channels.json", |
| 109 | flatbuffers = [ |
| 110 | ":drivetrain_status_fbs", |
| 111 | ], |
| 112 | visibility = ["//visibility:public"], |
| 113 | ) |
| 114 | |
| 115 | aos_config( |
| 116 | name = "simulation_config", |
| 117 | src = "drivetrain_simulation_config.json", |
| 118 | visibility = ["//visibility:public"], |
| 119 | deps = [ |
| 120 | ":config", |
| 121 | ":simulation_channels", |
| 122 | ], |
| 123 | ) |
| 124 | |
| 125 | aos_config( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 126 | name = "config", |
| 127 | src = "drivetrain_config.json", |
| 128 | flatbuffers = [ |
| 129 | ":drivetrain_goal_fbs", |
| 130 | ":drivetrain_output_fbs", |
| 131 | ":drivetrain_status_fbs", |
| 132 | ":drivetrain_position_fbs", |
| 133 | ":localizer_fbs", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 134 | "//frc971/queues:gyro_fbs", |
| 135 | "//frc971/queues:gyro_uid_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 136 | "//frc971/wpilib:imu_fbs", |
Austin Schuh | ac17fba | 2020-03-28 15:55:33 -0700 | [diff] [blame^] | 137 | "//frc971/wpilib:imu_batch_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 138 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 139 | visibility = ["//visibility:public"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 140 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 141 | "//aos/robot_state:config", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 142 | ], |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 143 | ) |
| 144 | |
| 145 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 146 | name = "drivetrain_config", |
| 147 | hdrs = [ |
| 148 | "drivetrain_config.h", |
| 149 | ], |
| 150 | deps = [ |
| 151 | "//frc971:shifter_hall_effect", |
Austin Schuh | a062edb | 2019-01-03 13:17:13 -0800 | [diff] [blame] | 152 | "//frc971/control_loops:hybrid_state_feedback_loop", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 153 | "//frc971/control_loops:state_feedback_loop", |
| 154 | ], |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 155 | ) |
| 156 | |
| 157 | cc_library( |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 158 | name = "hybrid_ekf", |
| 159 | hdrs = ["hybrid_ekf.h"], |
| 160 | deps = [ |
| 161 | ":drivetrain_config", |
James Kuszmaul | 3c5b4d3 | 2020-02-11 17:22:14 -0800 | [diff] [blame] | 162 | "//aos:math", |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 163 | "//aos/containers:priority_queue", |
James Kuszmaul | fedc461 | 2019-03-10 11:24:51 -0700 | [diff] [blame] | 164 | "//aos/util:math", |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 165 | "//frc971/control_loops:c2d", |
| 166 | "//frc971/control_loops:runge_kutta", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 167 | "@org_tuxfamily_eigen//:eigen", |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 168 | ], |
| 169 | ) |
| 170 | |
| 171 | cc_test( |
| 172 | name = "hybrid_ekf_test", |
| 173 | srcs = ["hybrid_ekf_test.cc"], |
| 174 | deps = [ |
| 175 | ":drivetrain_test_lib", |
| 176 | ":hybrid_ekf", |
| 177 | ":trajectory", |
| 178 | "//aos/testing:googletest", |
| 179 | "//aos/testing:random_seed", |
| 180 | "//aos/testing:test_shm", |
| 181 | ], |
| 182 | ) |
| 183 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 184 | flatbuffer_cc_library( |
| 185 | name = "localizer_fbs", |
| 186 | srcs = ["localizer.fbs"], |
| 187 | gen_reflections = 1, |
James Kuszmaul | ef428a0 | 2019-03-02 22:19:41 -0800 | [diff] [blame] | 188 | ) |
| 189 | |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 190 | cc_library( |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 191 | name = "localizer", |
| 192 | hdrs = ["localizer.h"], |
| 193 | deps = [ |
| 194 | ":drivetrain_config", |
James Kuszmaul | 3c5b4d3 | 2020-02-11 17:22:14 -0800 | [diff] [blame] | 195 | ":drivetrain_status_fbs", |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 196 | ":hybrid_ekf", |
James Kuszmaul | 5398fae | 2020-02-17 16:44:03 -0800 | [diff] [blame] | 197 | "//frc971/control_loops:control_loops_fbs", |
James Kuszmaul | 5bc6fc9 | 2019-03-01 21:50:06 -0800 | [diff] [blame] | 198 | "//frc971/control_loops:pose", |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 199 | ], |
| 200 | ) |
| 201 | |
| 202 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 203 | name = "gear", |
| 204 | hdrs = [ |
| 205 | "gear.h", |
| 206 | ], |
| 207 | compatible_with = mcu_cpus, |
Austin Schuh | 093535c | 2016-03-05 23:21:00 -0800 | [diff] [blame] | 208 | ) |
| 209 | |
| 210 | cc_library( |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 211 | name = "splinedrivetrain", |
| 212 | srcs = [ |
| 213 | "splinedrivetrain.cc", |
| 214 | ], |
| 215 | hdrs = [ |
| 216 | "splinedrivetrain.h", |
| 217 | ], |
| 218 | deps = [ |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 219 | ":distance_spline", |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 220 | ":drivetrain_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 221 | ":drivetrain_goal_fbs", |
| 222 | ":drivetrain_output_fbs", |
| 223 | ":drivetrain_status_fbs", |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 224 | ":spline", |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 225 | ":trajectory", |
Alex Perry | 1ec3452 | 2019-02-17 22:44:10 -0800 | [diff] [blame] | 226 | "//aos:init", |
James Kuszmaul | c73bb22 | 2019-04-07 12:15:35 -0700 | [diff] [blame] | 227 | "//aos/util:math", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 228 | "//frc971/control_loops:control_loops_fbs", |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 229 | ], |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 230 | ) |
| 231 | |
| 232 | cc_library( |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 233 | name = "line_follow_drivetrain", |
| 234 | srcs = [ |
| 235 | "line_follow_drivetrain.cc", |
| 236 | ], |
| 237 | hdrs = [ |
| 238 | "line_follow_drivetrain.h", |
| 239 | ], |
| 240 | deps = [ |
| 241 | ":drivetrain_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 242 | ":drivetrain_goal_fbs", |
| 243 | ":drivetrain_output_fbs", |
| 244 | ":drivetrain_status_fbs", |
James Kuszmaul | 5bc6fc9 | 2019-03-01 21:50:06 -0800 | [diff] [blame] | 245 | ":localizer", |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 246 | "//aos:math", |
| 247 | "//aos/util:math", |
| 248 | "//frc971/control_loops:c2d", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 249 | "//frc971/control_loops:control_loops_fbs", |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 250 | "//frc971/control_loops:dlqr", |
| 251 | "//frc971/control_loops:pose", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 252 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 253 | "//y2019/control_loops/superstructure:superstructure_goal_fbs", |
| 254 | "@org_tuxfamily_eigen//:eigen", |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 255 | ], |
| 256 | ) |
| 257 | |
| 258 | cc_test( |
| 259 | name = "line_follow_drivetrain_test", |
| 260 | srcs = ["line_follow_drivetrain_test.cc"], |
| 261 | linkstatic = True, |
| 262 | restricted_to = ["//tools:k8"], |
| 263 | deps = [ |
| 264 | ":drivetrain_config", |
| 265 | ":drivetrain_test_lib", |
| 266 | ":line_follow_drivetrain", |
| 267 | ":trajectory", |
| 268 | "//aos/testing:googletest", |
| 269 | "//aos/testing:test_shm", |
| 270 | "//third_party/matplotlib-cpp", |
| 271 | "@com_github_gflags_gflags//:gflags", |
| 272 | ], |
| 273 | ) |
| 274 | |
| 275 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 276 | name = "ssdrivetrain", |
| 277 | srcs = [ |
| 278 | "ssdrivetrain.cc", |
| 279 | ], |
| 280 | hdrs = [ |
| 281 | "ssdrivetrain.h", |
| 282 | ], |
| 283 | deps = [ |
| 284 | ":drivetrain_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 285 | ":drivetrain_goal_fbs", |
| 286 | ":drivetrain_output_fbs", |
| 287 | ":drivetrain_status_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 288 | ":gear", |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 289 | ":localizer", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 290 | "//aos:math", |
| 291 | "//aos/controls:control_loop", |
| 292 | "//aos/controls:polytope", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 293 | "//aos/robot_state:robot_state_fbs", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 294 | "//aos/util:log_interval", |
| 295 | "//aos/util:trapezoid_profile", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 296 | "//frc971:shifter_hall_effect", |
| 297 | "//frc971/control_loops:coerce_goal", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 298 | "//frc971/control_loops:control_loops_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 299 | "//frc971/control_loops:state_feedback_loop", |
| 300 | ], |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 301 | ) |
| 302 | |
| 303 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 304 | name = "polydrivetrain", |
| 305 | srcs = [ |
| 306 | "polydrivetrain.cc", |
| 307 | ], |
| 308 | hdrs = [ |
| 309 | "polydrivetrain.h", |
| 310 | ], |
| 311 | deps = [ |
| 312 | ":drivetrain_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 313 | ":drivetrain_goal_fbs", |
| 314 | ":drivetrain_output_fbs", |
| 315 | ":drivetrain_position_fbs", |
| 316 | ":drivetrain_status_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 317 | ":gear", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 318 | "//aos:math", |
| 319 | "//aos/controls:polytope", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 320 | "//aos/robot_state:robot_state_fbs", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 321 | "//aos/util:log_interval", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 322 | "//frc971/control_loops:coerce_goal", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 323 | "//frc971/control_loops:control_loops_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 324 | "//frc971/control_loops:state_feedback_loop", |
| 325 | ], |
| 326 | ) |
| 327 | |
| 328 | cc_library( |
| 329 | name = "drivetrain_config_uc", |
| 330 | hdrs = [ |
| 331 | "drivetrain_config.h", |
| 332 | ], |
| 333 | restricted_to = mcu_cpus, |
| 334 | deps = [ |
| 335 | "//frc971:shifter_hall_effect", |
| 336 | "//frc971/control_loops:state_feedback_loop_uc", |
| 337 | ], |
| 338 | ) |
| 339 | |
| 340 | cc_library( |
| 341 | name = "polydrivetrain_uc", |
| 342 | srcs = [ |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 343 | "polydrivetrain.cc", |
| 344 | ], |
| 345 | hdrs = [ |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 346 | "polydrivetrain.h", |
| 347 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 348 | copts = ["-Wno-type-limits"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 349 | restricted_to = mcu_cpus, |
| 350 | deps = [ |
| 351 | ":drivetrain_config_uc", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 352 | ":drivetrain_goal_float_fbs", |
| 353 | ":drivetrain_output_float_fbs", |
| 354 | ":drivetrain_position_float_fbs", |
| 355 | ":drivetrain_status_float_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 356 | ":gear", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 357 | "//aos:math", |
| 358 | "//aos/controls:polytope_uc", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 359 | "//frc971/control_loops:coerce_goal_uc", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 360 | "//frc971/control_loops:control_loops_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 361 | "//frc971/control_loops:state_feedback_loop_uc", |
| 362 | ], |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 363 | ) |
| 364 | |
Austin Schuh | 05c5a61 | 2016-04-02 15:10:25 -0700 | [diff] [blame] | 365 | genrule( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 366 | name = "genrule_down_estimator", |
| 367 | outs = [ |
| 368 | "down_estimator.h", |
| 369 | "down_estimator.cc", |
| 370 | ], |
| 371 | cmd = "$(location //frc971/control_loops/python:down_estimator) $(OUTS)", |
| 372 | tools = [ |
| 373 | "//frc971/control_loops/python:down_estimator", |
| 374 | ], |
| 375 | visibility = ["//visibility:private"], |
Austin Schuh | 05c5a61 | 2016-04-02 15:10:25 -0700 | [diff] [blame] | 376 | ) |
| 377 | |
| 378 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 379 | name = "down_estimator", |
| 380 | srcs = [ |
| 381 | "down_estimator.cc", |
| 382 | ], |
| 383 | hdrs = [ |
| 384 | "down_estimator.h", |
| 385 | ], |
| 386 | deps = [ |
| 387 | "//frc971/control_loops:state_feedback_loop", |
| 388 | ], |
Austin Schuh | 05c5a61 | 2016-04-02 15:10:25 -0700 | [diff] [blame] | 389 | ) |
| 390 | |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 391 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 392 | name = "drivetrain_lib", |
| 393 | srcs = [ |
| 394 | "drivetrain.cc", |
| 395 | ], |
| 396 | hdrs = [ |
| 397 | "drivetrain.h", |
| 398 | ], |
| 399 | deps = [ |
| 400 | ":down_estimator", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 401 | ":drivetrain_goal_fbs", |
| 402 | ":drivetrain_output_fbs", |
| 403 | ":drivetrain_position_fbs", |
| 404 | ":drivetrain_status_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 405 | ":gear", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 406 | ":improved_down_estimator", |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 407 | ":line_follow_drivetrain", |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 408 | ":localizer", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 409 | ":localizer_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 410 | ":polydrivetrain", |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 411 | ":splinedrivetrain", |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 412 | ":ssdrivetrain", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 413 | "//aos/controls:control_loop", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 414 | "//aos/util:log_interval", |
Austin Schuh | 3a37846 | 2019-01-04 21:48:04 -0800 | [diff] [blame] | 415 | "//frc971/control_loops:runge_kutta", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 416 | "//frc971/queues:gyro_fbs", |
Austin Schuh | ac17fba | 2020-03-28 15:55:33 -0700 | [diff] [blame^] | 417 | "//frc971/wpilib:imu_batch_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 418 | "//frc971/wpilib:imu_fbs", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 419 | "//frc971/zeroing:imu_zeroer", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 420 | ], |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 421 | ) |
| 422 | |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 423 | cc_library( |
| 424 | name = "drivetrain_test_lib", |
| 425 | testonly = True, |
| 426 | srcs = ["drivetrain_test_lib.cc"], |
| 427 | hdrs = ["drivetrain_test_lib.h"], |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 428 | defines = |
| 429 | cpu_select({ |
| 430 | "amd64": [ |
| 431 | "SUPPORT_PLOT=1", |
| 432 | ], |
| 433 | "arm": [], |
| 434 | }), |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 435 | deps = [ |
| 436 | ":drivetrain_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 437 | ":drivetrain_goal_fbs", |
| 438 | ":drivetrain_output_fbs", |
| 439 | ":drivetrain_position_fbs", |
| 440 | ":drivetrain_status_fbs", |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 441 | ":trajectory", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 442 | "//aos/events:event_loop", |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 443 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 444 | "//frc971/control_loops:control_loops_fbs", |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 445 | "//frc971/control_loops:state_feedback_loop", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 446 | "//frc971/queues:gyro_fbs", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 447 | "//frc971/wpilib:imu_fbs", |
Austin Schuh | ac17fba | 2020-03-28 15:55:33 -0700 | [diff] [blame^] | 448 | "//frc971/wpilib:imu_batch_fbs", |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 449 | "//y2016:constants", |
| 450 | "//y2016/control_loops/drivetrain:polydrivetrain_plants", |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 451 | ] + cpu_select({ |
| 452 | "amd64": [ |
| 453 | "//third_party/matplotlib-cpp", |
| 454 | ], |
| 455 | "arm": [], |
| 456 | }), |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 457 | ) |
| 458 | |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 459 | cc_test( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 460 | name = "drivetrain_lib_test", |
| 461 | srcs = [ |
| 462 | "drivetrain_lib_test.cc", |
| 463 | ], |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 464 | data = ["simulation_config.json"], |
Alex Perry | 04300d6 | 2019-02-17 14:37:04 -0800 | [diff] [blame] | 465 | defines = |
| 466 | cpu_select({ |
| 467 | "amd64": [ |
| 468 | "SUPPORT_PLOT=1", |
| 469 | ], |
| 470 | "arm": [], |
| 471 | }), |
| 472 | linkstatic = True, |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 473 | deps = [ |
| 474 | ":drivetrain_config", |
| 475 | ":drivetrain_lib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 476 | ":localizer_fbs", |
| 477 | ":drivetrain_goal_fbs", |
| 478 | ":drivetrain_status_fbs", |
| 479 | ":drivetrain_position_fbs", |
| 480 | ":drivetrain_output_fbs", |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 481 | ":drivetrain_test_lib", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 482 | "//aos/controls:control_loop_test", |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 483 | "//aos/events/logging:logger", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 484 | "//aos/testing:googletest", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 485 | "//frc971/queues:gyro_fbs", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 486 | "//frc971/wpilib:imu_fbs", |
Alex Perry | 04300d6 | 2019-02-17 14:37:04 -0800 | [diff] [blame] | 487 | ] + cpu_select({ |
| 488 | "amd64": [ |
| 489 | "//third_party/matplotlib-cpp", |
| 490 | ], |
| 491 | "arm": [], |
| 492 | }), |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 493 | ) |
Brian Silverman | 6260c09 | 2018-01-14 15:21:36 -0800 | [diff] [blame] | 494 | |
| 495 | genrule( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 496 | name = "genrule_haptic_wheel", |
| 497 | outs = [ |
| 498 | "haptic_wheel.h", |
| 499 | "haptic_wheel.cc", |
| 500 | "integral_haptic_wheel.h", |
| 501 | "integral_haptic_wheel.cc", |
| 502 | "haptic_trigger.h", |
| 503 | "haptic_trigger.cc", |
| 504 | "integral_haptic_trigger.h", |
| 505 | "integral_haptic_trigger.cc", |
| 506 | ], |
| 507 | cmd = "$(location //frc971/control_loops/python:haptic_wheel) $(OUTS)", |
| 508 | compatible_with = mcu_cpus, |
| 509 | tools = [ |
| 510 | "//frc971/control_loops/python:haptic_wheel", |
| 511 | ], |
| 512 | visibility = ["//visibility:private"], |
Brian Silverman | 6260c09 | 2018-01-14 15:21:36 -0800 | [diff] [blame] | 513 | ) |
| 514 | |
| 515 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 516 | name = "haptic_input_uc", |
| 517 | srcs = [ |
| 518 | "haptic_trigger.cc", |
| 519 | "haptic_wheel.cc", |
| 520 | "integral_haptic_trigger.cc", |
| 521 | "integral_haptic_wheel.cc", |
| 522 | ], |
| 523 | hdrs = [ |
| 524 | "haptic_trigger.h", |
| 525 | "haptic_wheel.h", |
| 526 | "integral_haptic_trigger.h", |
| 527 | "integral_haptic_wheel.h", |
| 528 | ], |
| 529 | restricted_to = mcu_cpus, |
| 530 | deps = [ |
| 531 | "//frc971/control_loops:state_feedback_loop_uc", |
| 532 | ], |
Brian Silverman | 6260c09 | 2018-01-14 15:21:36 -0800 | [diff] [blame] | 533 | ) |
| 534 | |
| 535 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 536 | name = "haptic_wheel", |
| 537 | srcs = [ |
| 538 | "haptic_trigger.cc", |
| 539 | "haptic_wheel.cc", |
| 540 | "integral_haptic_trigger.cc", |
| 541 | "integral_haptic_wheel.cc", |
| 542 | ], |
| 543 | hdrs = [ |
| 544 | "haptic_trigger.h", |
| 545 | "haptic_wheel.h", |
| 546 | "integral_haptic_trigger.h", |
| 547 | "integral_haptic_wheel.h", |
| 548 | ], |
| 549 | deps = [ |
| 550 | "//frc971/control_loops:state_feedback_loop", |
| 551 | ], |
Brian Silverman | 6260c09 | 2018-01-14 15:21:36 -0800 | [diff] [blame] | 552 | ) |
Austin Schuh | c2b0877 | 2018-12-19 18:05:06 +1100 | [diff] [blame] | 553 | |
| 554 | cc_library( |
| 555 | name = "spline", |
| 556 | srcs = ["spline.cc"], |
| 557 | hdrs = ["spline.h"], |
| 558 | deps = [ |
Austin Schuh | f49b4e3 | 2019-01-13 17:26:58 -0800 | [diff] [blame] | 559 | "//frc971/control_loops:binomial", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 560 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | c2b0877 | 2018-12-19 18:05:06 +1100 | [diff] [blame] | 561 | ], |
| 562 | ) |
| 563 | |
Alex Perry | a60da44 | 2019-01-21 19:00:27 -0500 | [diff] [blame] | 564 | cc_binary( |
| 565 | name = "spline.so", |
| 566 | srcs = ["libspline.cc"], |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 567 | linkshared = True, |
Alex Perry | a60da44 | 2019-01-21 19:00:27 -0500 | [diff] [blame] | 568 | deps = [ |
| 569 | ":distance_spline", |
| 570 | ":spline", |
Alex Perry | 0603b54 | 2019-01-25 20:29:51 -0800 | [diff] [blame] | 571 | ":trajectory", |
| 572 | "//aos/logging:implementations", |
| 573 | "//aos/network:team_number", |
James Kuszmaul | 8aa37cb | 2020-03-01 10:27:58 -0800 | [diff] [blame] | 574 | "//y2020/control_loops/drivetrain:drivetrain_base", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 575 | "@org_tuxfamily_eigen//:eigen", |
Alex Perry | a60da44 | 2019-01-21 19:00:27 -0500 | [diff] [blame] | 576 | ], |
Alex Perry | a60da44 | 2019-01-21 19:00:27 -0500 | [diff] [blame] | 577 | ) |
| 578 | |
Austin Schuh | c2b0877 | 2018-12-19 18:05:06 +1100 | [diff] [blame] | 579 | cc_test( |
| 580 | name = "spline_test", |
| 581 | srcs = [ |
| 582 | "spline_test.cc", |
| 583 | ], |
| 584 | restricted_to = ["//tools:k8"], |
| 585 | deps = [ |
| 586 | ":spline", |
| 587 | "//aos/testing:googletest", |
| 588 | "//third_party/matplotlib-cpp", |
| 589 | "@com_github_gflags_gflags//:gflags", |
| 590 | ], |
| 591 | ) |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 592 | |
| 593 | cc_library( |
| 594 | name = "distance_spline", |
| 595 | srcs = ["distance_spline.cc"], |
| 596 | hdrs = ["distance_spline.h"], |
| 597 | deps = [ |
| 598 | ":spline", |
Austin Schuh | a6e7b21 | 2019-01-20 13:53:01 -0800 | [diff] [blame] | 599 | "//aos/logging", |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 600 | "//frc971/control_loops:fixed_quadrature", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 601 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 602 | ], |
| 603 | ) |
| 604 | |
| 605 | cc_test( |
| 606 | name = "distance_spline_test", |
| 607 | srcs = [ |
| 608 | "distance_spline_test.cc", |
| 609 | ], |
Austin Schuh | 9b0b643 | 2019-01-13 21:15:17 -0800 | [diff] [blame] | 610 | defines = |
| 611 | cpu_select({ |
| 612 | "amd64": [ |
| 613 | "SUPPORT_PLOT=1", |
| 614 | ], |
| 615 | "arm": [], |
| 616 | }), |
| 617 | linkstatic = True, |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 618 | deps = [ |
| 619 | ":distance_spline", |
| 620 | "//aos/testing:googletest", |
Austin Schuh | a6e7b21 | 2019-01-20 13:53:01 -0800 | [diff] [blame] | 621 | "//aos/testing:test_shm", |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 622 | "@com_github_gflags_gflags//:gflags", |
Austin Schuh | 9b0b643 | 2019-01-13 21:15:17 -0800 | [diff] [blame] | 623 | ] + cpu_select({ |
| 624 | "amd64": [ |
| 625 | "//third_party/matplotlib-cpp", |
| 626 | ], |
| 627 | "arm": [], |
| 628 | }), |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 629 | ) |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 630 | |
| 631 | cc_library( |
| 632 | name = "trajectory", |
| 633 | srcs = ["trajectory.cc"], |
| 634 | hdrs = ["trajectory.h"], |
| 635 | deps = [ |
| 636 | ":distance_spline", |
| 637 | ":drivetrain_config", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 638 | "//frc971/control_loops:c2d", |
| 639 | "//frc971/control_loops:dlqr", |
| 640 | "//frc971/control_loops:hybrid_state_feedback_loop", |
| 641 | "//frc971/control_loops:runge_kutta", |
| 642 | "//frc971/control_loops:state_feedback_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 643 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 644 | ], |
| 645 | ) |
| 646 | |
| 647 | cc_binary( |
| 648 | name = "trajectory_plot", |
| 649 | srcs = [ |
| 650 | "trajectory_plot.cc", |
| 651 | ], |
| 652 | restricted_to = ["//tools:k8"], |
| 653 | deps = [ |
| 654 | ":distance_spline", |
| 655 | ":trajectory", |
| 656 | "//aos/logging:implementations", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 657 | "//aos/network:team_number", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 658 | "//third_party/matplotlib-cpp", |
Austin Schuh | 1104318 | 2019-03-23 22:29:12 -0700 | [diff] [blame] | 659 | "//y2019/control_loops/drivetrain:drivetrain_base", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 660 | "@com_github_gflags_gflags//:gflags", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 661 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 662 | ], |
| 663 | ) |
| 664 | |
| 665 | cc_test( |
| 666 | name = "trajectory_test", |
| 667 | srcs = [ |
| 668 | "trajectory_test.cc", |
| 669 | ], |
Austin Schuh | 719a33e | 2019-01-07 15:13:34 -0800 | [diff] [blame] | 670 | defines = |
| 671 | cpu_select({ |
| 672 | "amd64": [ |
| 673 | "SUPPORT_PLOT=1", |
| 674 | ], |
| 675 | "arm": [], |
| 676 | }), |
| 677 | linkstatic = True, |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 678 | deps = [ |
| 679 | ":trajectory", |
James Kuszmaul | ea314d9 | 2019-02-18 19:45:06 -0800 | [diff] [blame] | 680 | ":drivetrain_test_lib", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 681 | "//aos/testing:googletest", |
| 682 | "//aos/testing:test_shm", |
| 683 | "//y2016:constants", |
| 684 | "//y2016/control_loops/drivetrain:polydrivetrain_plants", |
James Kuszmaul | ea314d9 | 2019-02-18 19:45:06 -0800 | [diff] [blame] | 685 | "//y2019/control_loops/drivetrain:drivetrain_base", |
Austin Schuh | 719a33e | 2019-01-07 15:13:34 -0800 | [diff] [blame] | 686 | ] + cpu_select({ |
| 687 | "amd64": [ |
| 688 | "//third_party/matplotlib-cpp", |
| 689 | ], |
| 690 | "arm": [], |
| 691 | }), |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 692 | ) |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 693 | |
| 694 | cc_library( |
| 695 | name = "improved_down_estimator", |
| 696 | srcs = [ |
| 697 | "improved_down_estimator.cc", |
| 698 | ], |
| 699 | hdrs = [ |
| 700 | "improved_down_estimator.h", |
| 701 | ], |
| 702 | deps = [ |
James Kuszmaul | 7f55f07 | 2020-03-01 10:21:26 -0800 | [diff] [blame] | 703 | ":drivetrain_config", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 704 | ":drivetrain_status_fbs", |
| 705 | "//aos/events:event_loop", |
| 706 | "//frc971/control_loops:control_loops_fbs", |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 707 | "//frc971/control_loops:runge_kutta", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 708 | "@//aos/time", |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 709 | "@com_github_google_glog//:glog", |
| 710 | "@org_tuxfamily_eigen//:eigen", |
| 711 | ], |
| 712 | ) |
| 713 | |
| 714 | cc_test( |
| 715 | name = "improved_down_estimator_test", |
| 716 | srcs = [ |
| 717 | "improved_down_estimator_test.cc", |
| 718 | ], |
| 719 | deps = [ |
James Kuszmaul | 7f55f07 | 2020-03-01 10:21:26 -0800 | [diff] [blame] | 720 | ":drivetrain_test_lib", |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 721 | "//aos/testing:googletest", |
| 722 | "//aos/testing:random_seed", |
| 723 | "//frc971/control_loops/drivetrain:improved_down_estimator", |
| 724 | "@org_tuxfamily_eigen//:eigen", |
| 725 | ], |
| 726 | ) |
James Kuszmaul | f4ede20 | 2020-02-14 08:47:40 -0800 | [diff] [blame] | 727 | |
| 728 | cc_library( |
| 729 | name = "camera", |
| 730 | srcs = ["camera.h"], |
| 731 | visibility = ["//visibility:public"], |
| 732 | deps = [ |
| 733 | "//aos/containers:sized_array", |
| 734 | "//frc971/control_loops:pose", |
| 735 | ], |
| 736 | ) |
| 737 | |
| 738 | cc_test( |
| 739 | name = "camera_test", |
| 740 | srcs = ["camera_test.cc"], |
| 741 | deps = [ |
| 742 | ":camera", |
| 743 | "//aos/testing:googletest", |
| 744 | ], |
| 745 | ) |