James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 1 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
James Kuszmaul | 62c3bd8 | 2024-01-17 20:03:05 -0800 | [diff] [blame] | 2 | load("//tools/build_rules:template.bzl", "jinja2_template") |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 3 | load("//tools/build_rules:js.bzl", "ts_project") |
Austin Schuh | a1d006e | 2022-09-14 21:50:42 -0700 | [diff] [blame] | 4 | load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 5 | load("//aos:config.bzl", "aos_config") |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 6 | load("//tools/build_rules:select.bzl", "cpu_select") |
Austin Schuh | 41fad8c | 2021-10-23 21:25:12 -0700 | [diff] [blame] | 7 | load("//aos:flatbuffers.bzl", "cc_static_flatbuffer") |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 8 | |
Philipp Schrader | cc016b3 | 2021-12-30 08:59:58 -0800 | [diff] [blame] | 9 | package(default_visibility = ["//visibility:public"]) |
| 10 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 11 | static_flatbuffer( |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 12 | name = "drivetrain_can_position_fbs", |
| 13 | srcs = ["drivetrain_can_position.fbs"], |
Maxwell Henderson | 10ed5c3 | 2024-01-09 12:40:54 -0800 | [diff] [blame] | 14 | deps = ["//frc971/control_loops:can_talonfx_fbs"], |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 15 | ) |
| 16 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 17 | static_flatbuffer( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 18 | name = "spline_goal_fbs", |
| 19 | srcs = ["spline_goal.fbs"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 20 | deps = ["//frc971/control_loops:control_loops_fbs"], |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 21 | ) |
| 22 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 23 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 24 | name = "drivetrain_goal_fbs", |
| 25 | srcs = ["drivetrain_goal.fbs"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 26 | deps = [ |
| 27 | ":spline_goal_fbs", |
| 28 | "//frc971/control_loops:control_loops_fbs", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 29 | ], |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 30 | ) |
| 31 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 32 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 33 | name = "drivetrain_output_fbs", |
| 34 | srcs = ["drivetrain_output.fbs"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 35 | ) |
| 36 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 37 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 38 | name = "drivetrain_position_fbs", |
| 39 | srcs = ["drivetrain_position.fbs"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 40 | ) |
| 41 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 42 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 43 | name = "drivetrain_status_fbs", |
| 44 | srcs = ["drivetrain_status.fbs"], |
Niko Sohmers | 43f7198 | 2024-01-03 19:43:59 -0800 | [diff] [blame^] | 45 | deps = [ |
| 46 | "//frc971/control_loops:control_loops_fbs", |
| 47 | "//frc971/control_loops:encoder_fault_status_fbs", |
| 48 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 49 | ) |
| 50 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 51 | static_flatbuffer( |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 52 | name = "trajectory_fbs", |
| 53 | srcs = ["trajectory.fbs"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 54 | deps = ["//frc971/control_loops:control_loops_fbs"], |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 55 | ) |
| 56 | |
Austin Schuh | 41fad8c | 2021-10-23 21:25:12 -0700 | [diff] [blame] | 57 | cc_static_flatbuffer( |
| 58 | name = "trajectory_schema", |
| 59 | function = "frc971::control_loops::drivetrain::fb::TrajectorySchema", |
| 60 | target = ":trajectory_fbs_reflection_out", |
| 61 | visibility = ["//visibility:public"], |
| 62 | ) |
| 63 | |
Alex Perry | 2124ae8 | 2020-03-07 14:19:06 -0800 | [diff] [blame] | 64 | flatbuffer_ts_library( |
| 65 | name = "drivetrain_status_ts_fbs", |
| 66 | srcs = ["drivetrain_status.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 67 | target_compatible_with = ["@platforms//os:linux"], |
Niko Sohmers | 43f7198 | 2024-01-03 19:43:59 -0800 | [diff] [blame^] | 68 | deps = [ |
| 69 | "//frc971/control_loops:control_loops_ts_fbs", |
| 70 | "//frc971/control_loops:encoder_fault_status_ts_fbs", |
| 71 | ], |
Alex Perry | 2124ae8 | 2020-03-07 14:19:06 -0800 | [diff] [blame] | 72 | ) |
| 73 | |
Niko Sohmers | 76f4756 | 2023-12-20 20:59:06 -0800 | [diff] [blame] | 74 | flatbuffer_ts_library( |
| 75 | name = "drivetrain_position_ts_fbs", |
| 76 | srcs = ["drivetrain_position.fbs"], |
| 77 | target_compatible_with = ["@platforms//os:linux"], |
| 78 | ) |
| 79 | |
| 80 | flatbuffer_ts_library( |
| 81 | name = "drivetrain_can_position_ts_fbs", |
| 82 | srcs = ["drivetrain_can_position.fbs"], |
| 83 | target_compatible_with = ["@platforms//os:linux"], |
Maxwell Henderson | 10ed5c3 | 2024-01-09 12:40:54 -0800 | [diff] [blame] | 84 | deps = ["//frc971/control_loops:can_talonfx_ts_fbs"], |
Niko Sohmers | 76f4756 | 2023-12-20 20:59:06 -0800 | [diff] [blame] | 85 | ) |
| 86 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 87 | genrule( |
| 88 | name = "drivetrain_goal_float_fbs_generated", |
| 89 | srcs = ["drivetrain_goal.fbs"], |
| 90 | outs = ["drivetrain_goal_float.fbs"], |
| 91 | cmd = "cat $(SRCS) | sed 's/double/float/g' > $(OUTS)", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 92 | ) |
| 93 | |
| 94 | genrule( |
| 95 | name = "drivetrain_position_float_fbs_generated", |
| 96 | srcs = ["drivetrain_position.fbs"], |
| 97 | outs = ["drivetrain_position_float.fbs"], |
| 98 | cmd = "cat $(SRCS) | sed 's/double/float/g' > $(OUTS)", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 99 | ) |
| 100 | |
| 101 | genrule( |
| 102 | name = "drivetrain_output_float_fbs_generated", |
| 103 | srcs = ["drivetrain_output.fbs"], |
| 104 | outs = ["drivetrain_output_float.fbs"], |
| 105 | cmd = "cat $(SRCS) | sed 's/double/float/g' > $(OUTS)", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 106 | ) |
| 107 | |
| 108 | genrule( |
| 109 | name = "drivetrain_status_float_fbs_generated", |
| 110 | srcs = ["drivetrain_status.fbs"], |
| 111 | outs = ["drivetrain_status_float.fbs"], |
| 112 | cmd = "cat $(SRCS) | sed 's/double/float/g' > $(OUTS)", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 113 | ) |
| 114 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 115 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 116 | name = "drivetrain_goal_float_fbs", |
| 117 | srcs = ["drivetrain_goal_float.fbs"], |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 118 | deps = [ |
| 119 | ":spline_goal_fbs", |
| 120 | "//frc971/control_loops:control_loops_fbs", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 121 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 122 | ) |
| 123 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 124 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 125 | name = "drivetrain_output_float_fbs", |
| 126 | srcs = ["drivetrain_output_float.fbs"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 127 | ) |
| 128 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 129 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 130 | name = "drivetrain_position_float_fbs", |
| 131 | srcs = ["drivetrain_position_float.fbs"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 132 | ) |
| 133 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 134 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 135 | name = "drivetrain_status_float_fbs", |
| 136 | srcs = ["drivetrain_status_float.fbs"], |
Niko Sohmers | 43f7198 | 2024-01-03 19:43:59 -0800 | [diff] [blame^] | 137 | deps = [ |
| 138 | "//frc971/control_loops:control_loops_fbs", |
| 139 | "//frc971/control_loops:encoder_fault_status_fbs", |
| 140 | ], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 141 | ) |
| 142 | |
| 143 | aos_config( |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 144 | name = "simulation_channels", |
| 145 | src = "drivetrain_simulation_channels.json", |
| 146 | flatbuffers = [ |
| 147 | ":drivetrain_status_fbs", |
Niko Sohmers | 43f7198 | 2024-01-03 19:43:59 -0800 | [diff] [blame^] | 148 | "//frc971/control_loops:encoder_fault_status_fbs", |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 149 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 150 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 151 | visibility = ["//visibility:public"], |
| 152 | ) |
| 153 | |
| 154 | aos_config( |
| 155 | name = "simulation_config", |
| 156 | src = "drivetrain_simulation_config.json", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 157 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 158 | visibility = ["//visibility:public"], |
| 159 | deps = [ |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 160 | ":aos_config", |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 161 | ":simulation_channels", |
| 162 | ], |
| 163 | ) |
| 164 | |
| 165 | aos_config( |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 166 | name = "aos_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 167 | src = "drivetrain_config.json", |
| 168 | flatbuffers = [ |
| 169 | ":drivetrain_goal_fbs", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 170 | ":trajectory_fbs", |
| 171 | ":spline_goal_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 172 | ":drivetrain_output_fbs", |
| 173 | ":drivetrain_status_fbs", |
| 174 | ":drivetrain_position_fbs", |
Niko Sohmers | 43f7198 | 2024-01-03 19:43:59 -0800 | [diff] [blame^] | 175 | ":drivetrain_can_position_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 176 | ":localizer_fbs", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 177 | "//frc971/queues:gyro_fbs", |
| 178 | "//frc971/queues:gyro_uid_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 179 | "//frc971/wpilib:imu_fbs", |
Austin Schuh | ac17fba | 2020-03-28 15:55:33 -0700 | [diff] [blame] | 180 | "//frc971/wpilib:imu_batch_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 181 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 182 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 183 | visibility = ["//visibility:public"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 184 | deps = [ |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 185 | "//frc971/input:aos_config", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 186 | ], |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 187 | ) |
| 188 | |
| 189 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 190 | name = "drivetrain_config", |
| 191 | hdrs = [ |
| 192 | "drivetrain_config.h", |
| 193 | ], |
| 194 | deps = [ |
| 195 | "//frc971:shifter_hall_effect", |
| 196 | "//frc971/control_loops:state_feedback_loop", |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 197 | "//frc971/control_loops:state_feedback_loop_converters", |
| 198 | ":drivetrain_config_fbs", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 199 | ] + select({ |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 200 | "@platforms//os:linux": [ |
| 201 | "//frc971/control_loops:hybrid_state_feedback_loop", |
| 202 | "//frc971/control_loops:hybrid_state_feedback_loop_converters", |
| 203 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 204 | "//conditions:default": [], |
| 205 | }), |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 206 | ) |
| 207 | |
| 208 | cc_library( |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 209 | name = "hybrid_ekf", |
| 210 | hdrs = ["hybrid_ekf.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 211 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 212 | deps = [ |
| 213 | ":drivetrain_config", |
James Kuszmaul | 3c5b4d3 | 2020-02-11 17:22:14 -0800 | [diff] [blame] | 214 | "//aos:math", |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 215 | "//aos/containers:priority_queue", |
James Kuszmaul | fedc461 | 2019-03-10 11:24:51 -0700 | [diff] [blame] | 216 | "//aos/util:math", |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 217 | "//frc971/control_loops:c2d", |
| 218 | "//frc971/control_loops:runge_kutta", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 219 | "@org_tuxfamily_eigen//:eigen", |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 220 | ], |
| 221 | ) |
| 222 | |
| 223 | cc_test( |
| 224 | name = "hybrid_ekf_test", |
| 225 | srcs = ["hybrid_ekf_test.cc"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 226 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 227 | deps = [ |
| 228 | ":drivetrain_test_lib", |
| 229 | ":hybrid_ekf", |
| 230 | ":trajectory", |
| 231 | "//aos/testing:googletest", |
| 232 | "//aos/testing:random_seed", |
| 233 | "//aos/testing:test_shm", |
| 234 | ], |
| 235 | ) |
| 236 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 237 | static_flatbuffer( |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 238 | name = "localizer_fbs", |
| 239 | srcs = ["localizer.fbs"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 240 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | ef428a0 | 2019-03-02 22:19:41 -0800 | [diff] [blame] | 241 | ) |
| 242 | |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 243 | cc_library( |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 244 | name = "localizer", |
| 245 | hdrs = ["localizer.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 246 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 247 | deps = [ |
| 248 | ":drivetrain_config", |
James Kuszmaul | 3c5b4d3 | 2020-02-11 17:22:14 -0800 | [diff] [blame] | 249 | ":drivetrain_status_fbs", |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 250 | ":hybrid_ekf", |
James Kuszmaul | 5398fae | 2020-02-17 16:44:03 -0800 | [diff] [blame] | 251 | "//frc971/control_loops:control_loops_fbs", |
James Kuszmaul | 5bc6fc9 | 2019-03-01 21:50:06 -0800 | [diff] [blame] | 252 | "//frc971/control_loops:pose", |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 253 | ], |
| 254 | ) |
| 255 | |
| 256 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 257 | name = "gear", |
| 258 | hdrs = [ |
| 259 | "gear.h", |
| 260 | ], |
Austin Schuh | 093535c | 2016-03-05 23:21:00 -0800 | [diff] [blame] | 261 | ) |
| 262 | |
| 263 | cc_library( |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 264 | name = "splinedrivetrain", |
| 265 | srcs = [ |
| 266 | "splinedrivetrain.cc", |
| 267 | ], |
| 268 | hdrs = [ |
| 269 | "splinedrivetrain.h", |
| 270 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 271 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 272 | deps = [ |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 273 | ":distance_spline", |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 274 | ":drivetrain_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 275 | ":drivetrain_goal_fbs", |
| 276 | ":drivetrain_output_fbs", |
| 277 | ":drivetrain_status_fbs", |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 278 | ":spline", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 279 | ":spline_goal_fbs", |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 280 | ":trajectory", |
Austin Schuh | 3d9ccd7 | 2020-08-01 15:42:40 -0700 | [diff] [blame] | 281 | "//aos:condition", |
Alex Perry | 1ec3452 | 2019-02-17 22:44:10 -0800 | [diff] [blame] | 282 | "//aos:init", |
James Kuszmaul | c73bb22 | 2019-04-07 12:15:35 -0700 | [diff] [blame] | 283 | "//aos/util:math", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 284 | "//frc971/control_loops:control_loops_fbs", |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 285 | ], |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 286 | ) |
| 287 | |
| 288 | cc_library( |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 289 | name = "line_follow_drivetrain", |
| 290 | srcs = [ |
| 291 | "line_follow_drivetrain.cc", |
| 292 | ], |
| 293 | hdrs = [ |
| 294 | "line_follow_drivetrain.h", |
| 295 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 296 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 297 | deps = [ |
| 298 | ":drivetrain_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 299 | ":drivetrain_goal_fbs", |
| 300 | ":drivetrain_output_fbs", |
| 301 | ":drivetrain_status_fbs", |
James Kuszmaul | 5bc6fc9 | 2019-03-01 21:50:06 -0800 | [diff] [blame] | 302 | ":localizer", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 303 | ":spline_goal_fbs", |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 304 | "//aos:math", |
| 305 | "//aos/util:math", |
| 306 | "//frc971/control_loops:c2d", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 307 | "//frc971/control_loops:control_loops_fbs", |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 308 | "//frc971/control_loops:dlqr", |
| 309 | "//frc971/control_loops:pose", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 310 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 311 | "//y2019/control_loops/superstructure:superstructure_goal_fbs", |
| 312 | "@org_tuxfamily_eigen//:eigen", |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 313 | ], |
| 314 | ) |
| 315 | |
| 316 | cc_test( |
| 317 | name = "line_follow_drivetrain_test", |
| 318 | srcs = ["line_follow_drivetrain_test.cc"], |
| 319 | linkstatic = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 320 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 321 | deps = [ |
| 322 | ":drivetrain_config", |
| 323 | ":drivetrain_test_lib", |
| 324 | ":line_follow_drivetrain", |
| 325 | ":trajectory", |
| 326 | "//aos/testing:googletest", |
| 327 | "//aos/testing:test_shm", |
| 328 | "//third_party/matplotlib-cpp", |
| 329 | "@com_github_gflags_gflags//:gflags", |
| 330 | ], |
| 331 | ) |
| 332 | |
| 333 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 334 | name = "ssdrivetrain", |
| 335 | srcs = [ |
| 336 | "ssdrivetrain.cc", |
| 337 | ], |
| 338 | hdrs = [ |
| 339 | "ssdrivetrain.h", |
| 340 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 341 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 342 | deps = [ |
| 343 | ":drivetrain_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 344 | ":drivetrain_goal_fbs", |
| 345 | ":drivetrain_output_fbs", |
Austin Schuh | 95771d9 | 2021-01-23 14:42:25 -0800 | [diff] [blame] | 346 | ":drivetrain_states", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 347 | ":drivetrain_status_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 348 | ":gear", |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 349 | ":localizer", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 350 | ":spline_goal_fbs", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 351 | "//aos:math", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 352 | "//aos/util:log_interval", |
| 353 | "//aos/util:trapezoid_profile", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 354 | "//frc971:shifter_hall_effect", |
| 355 | "//frc971/control_loops:coerce_goal", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 356 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 357 | "//frc971/control_loops:control_loops_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 358 | "//frc971/control_loops:polytope", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 359 | "//frc971/control_loops:state_feedback_loop", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 360 | "//frc971/input:robot_state_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 361 | ], |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 362 | ) |
| 363 | |
| 364 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 365 | name = "polydrivetrain", |
| 366 | srcs = [ |
| 367 | "polydrivetrain.cc", |
| 368 | ], |
| 369 | hdrs = [ |
| 370 | "polydrivetrain.h", |
| 371 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 372 | copts = select({ |
| 373 | "@platforms//os:none": ["-Wno-type-limits"], |
| 374 | "//conditions:default": [], |
| 375 | }), |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 376 | deps = [ |
| 377 | ":drivetrain_config", |
Austin Schuh | 95771d9 | 2021-01-23 14:42:25 -0800 | [diff] [blame] | 378 | ":drivetrain_states", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 379 | ":gear", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 380 | ":spline_goal_fbs", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 381 | "//aos:math", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 382 | "//frc971/control_loops:coerce_goal", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 383 | "//frc971/control_loops:control_loops_fbs", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 384 | "//frc971/control_loops:polytope", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 385 | "//frc971/control_loops:state_feedback_loop", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 386 | ] + select({ |
| 387 | "@platforms//os:linux": [ |
| 388 | ":drivetrain_goal_fbs", |
| 389 | ":drivetrain_output_fbs", |
| 390 | ":drivetrain_position_fbs", |
| 391 | ":drivetrain_status_fbs", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 392 | "//aos/util:log_interval", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 393 | "//frc971/input:robot_state_fbs", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 394 | ], |
| 395 | "@platforms//os:none": [ |
| 396 | ":drivetrain_goal_float_fbs", |
| 397 | ":drivetrain_output_float_fbs", |
| 398 | ":drivetrain_position_float_fbs", |
| 399 | ":drivetrain_status_float_fbs", |
| 400 | ], |
| 401 | }), |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 402 | ) |
| 403 | |
Austin Schuh | 05c5a61 | 2016-04-02 15:10:25 -0700 | [diff] [blame] | 404 | genrule( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 405 | name = "genrule_down_estimator", |
| 406 | outs = [ |
| 407 | "down_estimator.h", |
| 408 | "down_estimator.cc", |
| 409 | ], |
| 410 | cmd = "$(location //frc971/control_loops/python:down_estimator) $(OUTS)", |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 411 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 412 | tools = [ |
| 413 | "//frc971/control_loops/python:down_estimator", |
| 414 | ], |
| 415 | visibility = ["//visibility:private"], |
Austin Schuh | 05c5a61 | 2016-04-02 15:10:25 -0700 | [diff] [blame] | 416 | ) |
| 417 | |
| 418 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 419 | name = "down_estimator", |
| 420 | srcs = [ |
| 421 | "down_estimator.cc", |
| 422 | ], |
| 423 | hdrs = [ |
| 424 | "down_estimator.h", |
| 425 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 426 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 427 | deps = [ |
| 428 | "//frc971/control_loops:state_feedback_loop", |
| 429 | ], |
Austin Schuh | 05c5a61 | 2016-04-02 15:10:25 -0700 | [diff] [blame] | 430 | ) |
| 431 | |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 432 | cc_library( |
Austin Schuh | 95771d9 | 2021-01-23 14:42:25 -0800 | [diff] [blame] | 433 | name = "drivetrain_states", |
| 434 | hdrs = ["drivetrain_states.h"], |
| 435 | ) |
| 436 | |
| 437 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 438 | name = "drivetrain_lib", |
| 439 | srcs = [ |
| 440 | "drivetrain.cc", |
| 441 | ], |
| 442 | hdrs = [ |
| 443 | "drivetrain.h", |
| 444 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 445 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 446 | deps = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 447 | ":drivetrain_goal_fbs", |
| 448 | ":drivetrain_output_fbs", |
| 449 | ":drivetrain_position_fbs", |
Austin Schuh | 95771d9 | 2021-01-23 14:42:25 -0800 | [diff] [blame] | 450 | ":drivetrain_states", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 451 | ":drivetrain_status_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 452 | ":gear", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 453 | ":improved_down_estimator", |
James Kuszmaul | e39cbcf | 2019-02-27 20:48:34 -0800 | [diff] [blame] | 454 | ":line_follow_drivetrain", |
James Kuszmaul | 3431d62 | 2019-02-17 17:07:44 -0800 | [diff] [blame] | 455 | ":localizer", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 456 | ":localizer_fbs", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 457 | ":polydrivetrain", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 458 | ":spline_goal_fbs", |
Alex Perry | 731b460 | 2019-02-02 22:13:01 -0800 | [diff] [blame] | 459 | ":splinedrivetrain", |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 460 | ":ssdrivetrain", |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 461 | "//aos/util:log_interval", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 462 | "//frc971/control_loops:control_loop", |
Austin Schuh | 3a37846 | 2019-01-04 21:48:04 -0800 | [diff] [blame] | 463 | "//frc971/control_loops:runge_kutta", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 464 | "//frc971/queues:gyro_fbs", |
Austin Schuh | ac17fba | 2020-03-28 15:55:33 -0700 | [diff] [blame] | 465 | "//frc971/wpilib:imu_batch_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 466 | "//frc971/wpilib:imu_fbs", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 467 | "//frc971/zeroing:imu_zeroer", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 468 | ], |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 469 | ) |
| 470 | |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 471 | cc_library( |
| 472 | name = "drivetrain_test_lib", |
| 473 | testonly = True, |
| 474 | srcs = ["drivetrain_test_lib.cc"], |
| 475 | hdrs = ["drivetrain_test_lib.h"], |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 476 | defines = |
| 477 | cpu_select({ |
| 478 | "amd64": [ |
| 479 | "SUPPORT_PLOT=1", |
| 480 | ], |
| 481 | "arm": [], |
| 482 | }), |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 483 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 484 | deps = [ |
| 485 | ":drivetrain_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 486 | ":drivetrain_goal_fbs", |
| 487 | ":drivetrain_output_fbs", |
| 488 | ":drivetrain_position_fbs", |
| 489 | ":drivetrain_status_fbs", |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 490 | ":trajectory", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 491 | "//aos/events:event_loop", |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 492 | "//aos/testing:googletest", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 493 | "//frc971/control_loops:control_loops_fbs", |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 494 | "//frc971/control_loops:state_feedback_loop", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 495 | "//frc971/queues:gyro_fbs", |
Austin Schuh | ac17fba | 2020-03-28 15:55:33 -0700 | [diff] [blame] | 496 | "//frc971/wpilib:imu_batch_fbs", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 497 | "//frc971/wpilib:imu_fbs", |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 498 | "//y2016:constants", |
| 499 | "//y2016/control_loops/drivetrain:polydrivetrain_plants", |
James Kuszmaul | 74d8f97 | 2020-02-11 17:13:17 -0800 | [diff] [blame] | 500 | ] + cpu_select({ |
| 501 | "amd64": [ |
| 502 | "//third_party/matplotlib-cpp", |
| 503 | ], |
| 504 | "arm": [], |
| 505 | }), |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 506 | ) |
| 507 | |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 508 | cc_test( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 509 | name = "drivetrain_lib_test", |
| 510 | srcs = [ |
| 511 | "drivetrain_lib_test.cc", |
| 512 | ], |
Austin Schuh | 14d7d3d | 2020-09-10 18:14:36 -0700 | [diff] [blame] | 513 | data = [":simulation_config"], |
Alex Perry | 04300d6 | 2019-02-17 14:37:04 -0800 | [diff] [blame] | 514 | defines = |
| 515 | cpu_select({ |
| 516 | "amd64": [ |
| 517 | "SUPPORT_PLOT=1", |
| 518 | ], |
| 519 | "arm": [], |
| 520 | }), |
| 521 | linkstatic = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 522 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 523 | deps = [ |
| 524 | ":drivetrain_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 525 | ":drivetrain_goal_fbs", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 526 | ":drivetrain_lib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 527 | ":drivetrain_output_fbs", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 528 | ":drivetrain_position_fbs", |
| 529 | ":drivetrain_status_fbs", |
James Kuszmaul | 109ed8d | 2019-02-17 21:41:04 -0800 | [diff] [blame] | 530 | ":drivetrain_test_lib", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 531 | ":localizer_fbs", |
| 532 | ":trajectory_generator", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 533 | "//aos/events/logging:log_writer", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 534 | "//aos/testing:googletest", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 535 | "//frc971/control_loops:control_loop_test", |
Tyler Chatow | 24b5db1 | 2020-01-06 21:16:56 -0800 | [diff] [blame] | 536 | "//frc971/queues:gyro_fbs", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 537 | "//frc971/wpilib:imu_fbs", |
Alex Perry | 04300d6 | 2019-02-17 14:37:04 -0800 | [diff] [blame] | 538 | ] + cpu_select({ |
| 539 | "amd64": [ |
| 540 | "//third_party/matplotlib-cpp", |
| 541 | ], |
| 542 | "arm": [], |
| 543 | }), |
Comran Morshed | 5323ecb | 2015-12-26 20:50:55 +0000 | [diff] [blame] | 544 | ) |
Brian Silverman | 6260c09 | 2018-01-14 15:21:36 -0800 | [diff] [blame] | 545 | |
| 546 | genrule( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 547 | name = "genrule_haptic_wheel", |
| 548 | outs = [ |
| 549 | "haptic_wheel.h", |
| 550 | "haptic_wheel.cc", |
| 551 | "integral_haptic_wheel.h", |
| 552 | "integral_haptic_wheel.cc", |
| 553 | "haptic_trigger.h", |
| 554 | "haptic_trigger.cc", |
| 555 | "integral_haptic_trigger.h", |
| 556 | "integral_haptic_trigger.cc", |
| 557 | ], |
| 558 | cmd = "$(location //frc971/control_loops/python:haptic_wheel) $(OUTS)", |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 559 | tools = [ |
| 560 | "//frc971/control_loops/python:haptic_wheel", |
| 561 | ], |
| 562 | visibility = ["//visibility:private"], |
Brian Silverman | 6260c09 | 2018-01-14 15:21:36 -0800 | [diff] [blame] | 563 | ) |
| 564 | |
| 565 | cc_library( |
Austin Schuh | bcce26a | 2018-03-26 23:41:24 -0700 | [diff] [blame] | 566 | name = "haptic_wheel", |
| 567 | srcs = [ |
| 568 | "haptic_trigger.cc", |
| 569 | "haptic_wheel.cc", |
| 570 | "integral_haptic_trigger.cc", |
| 571 | "integral_haptic_wheel.cc", |
| 572 | ], |
| 573 | hdrs = [ |
| 574 | "haptic_trigger.h", |
| 575 | "haptic_wheel.h", |
| 576 | "integral_haptic_trigger.h", |
| 577 | "integral_haptic_wheel.h", |
| 578 | ], |
| 579 | deps = [ |
| 580 | "//frc971/control_loops:state_feedback_loop", |
| 581 | ], |
Brian Silverman | 6260c09 | 2018-01-14 15:21:36 -0800 | [diff] [blame] | 582 | ) |
Austin Schuh | c2b0877 | 2018-12-19 18:05:06 +1100 | [diff] [blame] | 583 | |
| 584 | cc_library( |
| 585 | name = "spline", |
| 586 | srcs = ["spline.cc"], |
| 587 | hdrs = ["spline.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 588 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | c2b0877 | 2018-12-19 18:05:06 +1100 | [diff] [blame] | 589 | deps = [ |
Austin Schuh | f49b4e3 | 2019-01-13 17:26:58 -0800 | [diff] [blame] | 590 | "//frc971/control_loops:binomial", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 591 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | c2b0877 | 2018-12-19 18:05:06 +1100 | [diff] [blame] | 592 | ], |
| 593 | ) |
| 594 | |
Alex Perry | a60da44 | 2019-01-21 19:00:27 -0500 | [diff] [blame] | 595 | cc_binary( |
| 596 | name = "spline.so", |
| 597 | srcs = ["libspline.cc"], |
James Kuszmaul | 2ed7b3c | 2019-02-09 18:26:19 -0800 | [diff] [blame] | 598 | linkshared = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 599 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | a60da44 | 2019-01-21 19:00:27 -0500 | [diff] [blame] | 600 | deps = [ |
| 601 | ":distance_spline", |
| 602 | ":spline", |
Alex Perry | 0603b54 | 2019-01-25 20:29:51 -0800 | [diff] [blame] | 603 | ":trajectory", |
Austin Schuh | fc0caa8 | 2023-08-25 14:25:03 -0700 | [diff] [blame] | 604 | "//aos/logging", |
Alex Perry | 0603b54 | 2019-01-25 20:29:51 -0800 | [diff] [blame] | 605 | "//aos/network:team_number", |
James Kuszmaul | 8aa37cb | 2020-03-01 10:27:58 -0800 | [diff] [blame] | 606 | "//y2020/control_loops/drivetrain:drivetrain_base", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 607 | "@org_tuxfamily_eigen//:eigen", |
Alex Perry | a60da44 | 2019-01-21 19:00:27 -0500 | [diff] [blame] | 608 | ], |
Alex Perry | a60da44 | 2019-01-21 19:00:27 -0500 | [diff] [blame] | 609 | ) |
| 610 | |
Austin Schuh | c2b0877 | 2018-12-19 18:05:06 +1100 | [diff] [blame] | 611 | cc_test( |
| 612 | name = "spline_test", |
| 613 | srcs = [ |
| 614 | "spline_test.cc", |
| 615 | ], |
James Kuszmaul | e32fa93 | 2021-05-11 21:38:16 -0700 | [diff] [blame] | 616 | linkstatic = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 617 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | c2b0877 | 2018-12-19 18:05:06 +1100 | [diff] [blame] | 618 | deps = [ |
| 619 | ":spline", |
| 620 | "//aos/testing:googletest", |
James Kuszmaul | e32fa93 | 2021-05-11 21:38:16 -0700 | [diff] [blame] | 621 | "//frc971/analysis:in_process_plotter", |
Austin Schuh | c2b0877 | 2018-12-19 18:05:06 +1100 | [diff] [blame] | 622 | "@com_github_gflags_gflags//:gflags", |
| 623 | ], |
| 624 | ) |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 625 | |
| 626 | cc_library( |
| 627 | name = "distance_spline", |
| 628 | srcs = ["distance_spline.cc"], |
| 629 | hdrs = ["distance_spline.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 630 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 631 | deps = [ |
| 632 | ":spline", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 633 | ":trajectory_fbs", |
Austin Schuh | f7c6520 | 2022-11-04 21:28:20 -0700 | [diff] [blame] | 634 | "//aos/containers:sized_array", |
Austin Schuh | a6e7b21 | 2019-01-20 13:53:01 -0800 | [diff] [blame] | 635 | "//aos/logging", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 636 | "//frc971/control_loops:control_loops_fbs", |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 637 | "//frc971/control_loops:fixed_quadrature", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 638 | "@com_github_google_glog//:glog", |
Austin Schuh | f7c6520 | 2022-11-04 21:28:20 -0700 | [diff] [blame] | 639 | "@com_google_absl//absl/types:span", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 640 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 641 | ], |
| 642 | ) |
| 643 | |
| 644 | cc_test( |
| 645 | name = "distance_spline_test", |
| 646 | srcs = [ |
| 647 | "distance_spline_test.cc", |
| 648 | ], |
Austin Schuh | 9b0b643 | 2019-01-13 21:15:17 -0800 | [diff] [blame] | 649 | defines = |
| 650 | cpu_select({ |
| 651 | "amd64": [ |
| 652 | "SUPPORT_PLOT=1", |
| 653 | ], |
| 654 | "arm": [], |
| 655 | }), |
| 656 | linkstatic = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 657 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 658 | deps = [ |
| 659 | ":distance_spline", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 660 | "//aos:flatbuffers", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 661 | "//aos/testing:googletest", |
Austin Schuh | a6e7b21 | 2019-01-20 13:53:01 -0800 | [diff] [blame] | 662 | "//aos/testing:test_shm", |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 663 | "@com_github_gflags_gflags//:gflags", |
Austin Schuh | 9b0b643 | 2019-01-13 21:15:17 -0800 | [diff] [blame] | 664 | ] + cpu_select({ |
| 665 | "amd64": [ |
| 666 | "//third_party/matplotlib-cpp", |
| 667 | ], |
| 668 | "arm": [], |
| 669 | }), |
Austin Schuh | 941b46d | 2018-12-19 18:06:05 +1100 | [diff] [blame] | 670 | ) |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 671 | |
| 672 | cc_library( |
| 673 | name = "trajectory", |
| 674 | srcs = ["trajectory.cc"], |
| 675 | hdrs = ["trajectory.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 676 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 677 | deps = [ |
| 678 | ":distance_spline", |
| 679 | ":drivetrain_config", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 680 | ":spline_goal_fbs", |
| 681 | ":trajectory_fbs", |
James Kuszmaul | 5e8ce31 | 2021-03-27 14:59:17 -0700 | [diff] [blame] | 682 | "//aos/util:math", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 683 | "//frc971/control_loops:c2d", |
| 684 | "//frc971/control_loops:dlqr", |
| 685 | "//frc971/control_loops:hybrid_state_feedback_loop", |
| 686 | "//frc971/control_loops:runge_kutta", |
| 687 | "//frc971/control_loops:state_feedback_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 688 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 689 | ], |
| 690 | ) |
| 691 | |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 692 | cc_library( |
| 693 | name = "trajectory_generator", |
| 694 | srcs = ["trajectory_generator.cc"], |
| 695 | hdrs = ["trajectory_generator.h"], |
| 696 | target_compatible_with = ["@platforms//os:linux"], |
| 697 | deps = [ |
| 698 | ":distance_spline", |
| 699 | ":drivetrain_config", |
| 700 | ":spline_goal_fbs", |
| 701 | ":trajectory", |
| 702 | ":trajectory_fbs", |
| 703 | ], |
| 704 | ) |
| 705 | |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 706 | cc_binary( |
| 707 | name = "trajectory_plot", |
| 708 | srcs = [ |
| 709 | "trajectory_plot.cc", |
| 710 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 711 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 712 | deps = [ |
| 713 | ":distance_spline", |
| 714 | ":trajectory", |
Austin Schuh | fc0caa8 | 2023-08-25 14:25:03 -0700 | [diff] [blame] | 715 | "//aos/logging", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 716 | "//aos/network:team_number", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 717 | "//third_party/matplotlib-cpp", |
Austin Schuh | 1104318 | 2019-03-23 22:29:12 -0700 | [diff] [blame] | 718 | "//y2019/control_loops/drivetrain:drivetrain_base", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 719 | "@com_github_gflags_gflags//:gflags", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 720 | "@org_tuxfamily_eigen//:eigen", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 721 | ], |
| 722 | ) |
| 723 | |
| 724 | cc_test( |
| 725 | name = "trajectory_test", |
| 726 | srcs = [ |
| 727 | "trajectory_test.cc", |
| 728 | ], |
Austin Schuh | 719a33e | 2019-01-07 15:13:34 -0800 | [diff] [blame] | 729 | defines = |
| 730 | cpu_select({ |
| 731 | "amd64": [ |
| 732 | "SUPPORT_PLOT=1", |
| 733 | ], |
| 734 | "arm": [], |
| 735 | }), |
| 736 | linkstatic = True, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 737 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 738 | deps = [ |
James Kuszmaul | ea314d9 | 2019-02-18 19:45:06 -0800 | [diff] [blame] | 739 | ":drivetrain_test_lib", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 740 | ":trajectory", |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 741 | "//aos/testing:googletest", |
| 742 | "//aos/testing:test_shm", |
| 743 | "//y2016:constants", |
| 744 | "//y2016/control_loops/drivetrain:polydrivetrain_plants", |
James Kuszmaul | ea314d9 | 2019-02-18 19:45:06 -0800 | [diff] [blame] | 745 | "//y2019/control_loops/drivetrain:drivetrain_base", |
Austin Schuh | 719a33e | 2019-01-07 15:13:34 -0800 | [diff] [blame] | 746 | ] + cpu_select({ |
| 747 | "amd64": [ |
| 748 | "//third_party/matplotlib-cpp", |
| 749 | ], |
| 750 | "arm": [], |
| 751 | }), |
Austin Schuh | ec7f06d | 2019-01-04 07:47:15 +1100 | [diff] [blame] | 752 | ) |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 753 | |
| 754 | cc_library( |
| 755 | name = "improved_down_estimator", |
| 756 | srcs = [ |
| 757 | "improved_down_estimator.cc", |
| 758 | ], |
| 759 | hdrs = [ |
| 760 | "improved_down_estimator.h", |
| 761 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 762 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 763 | deps = [ |
James Kuszmaul | 7f55f07 | 2020-03-01 10:21:26 -0800 | [diff] [blame] | 764 | ":drivetrain_config", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 765 | ":drivetrain_status_fbs", |
| 766 | "//aos/events:event_loop", |
| 767 | "//frc971/control_loops:control_loops_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 768 | "//frc971/control_loops:quaternion_utils", |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 769 | "//frc971/control_loops:runge_kutta", |
James Kuszmaul | 3e1bb27 | 2020-01-17 18:38:19 -0800 | [diff] [blame] | 770 | "@//aos/time", |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 771 | "@com_github_google_glog//:glog", |
| 772 | "@org_tuxfamily_eigen//:eigen", |
| 773 | ], |
| 774 | ) |
| 775 | |
| 776 | cc_test( |
| 777 | name = "improved_down_estimator_test", |
| 778 | srcs = [ |
| 779 | "improved_down_estimator_test.cc", |
| 780 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 781 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 782 | deps = [ |
James Kuszmaul | 7f55f07 | 2020-03-01 10:21:26 -0800 | [diff] [blame] | 783 | ":drivetrain_test_lib", |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 784 | "//aos/testing:googletest", |
| 785 | "//aos/testing:random_seed", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 786 | "//frc971/control_loops:quaternion_utils", |
Austin Schuh | ca08081 | 2017-05-10 19:31:55 -0700 | [diff] [blame] | 787 | "//frc971/control_loops/drivetrain:improved_down_estimator", |
| 788 | "@org_tuxfamily_eigen//:eigen", |
| 789 | ], |
| 790 | ) |
James Kuszmaul | f4ede20 | 2020-02-14 08:47:40 -0800 | [diff] [blame] | 791 | |
| 792 | cc_library( |
| 793 | name = "camera", |
| 794 | srcs = ["camera.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 795 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f4ede20 | 2020-02-14 08:47:40 -0800 | [diff] [blame] | 796 | visibility = ["//visibility:public"], |
| 797 | deps = [ |
| 798 | "//aos/containers:sized_array", |
| 799 | "//frc971/control_loops:pose", |
| 800 | ], |
| 801 | ) |
| 802 | |
Niko Sohmers | 43f7198 | 2024-01-03 19:43:59 -0800 | [diff] [blame^] | 803 | cc_library( |
| 804 | name = "drivetrain_encoder_fault_detector", |
| 805 | srcs = ["drivetrain_encoder_fault_detector.cc"], |
| 806 | hdrs = ["drivetrain_encoder_fault_detector.h"], |
| 807 | target_compatible_with = ["@platforms//os:linux"], |
| 808 | deps = [ |
| 809 | "//aos/events:event_loop", |
| 810 | "//frc971/control_loops:encoder_fault_detector", |
| 811 | "//frc971/control_loops:encoder_fault_status_fbs", |
| 812 | "//frc971/control_loops/drivetrain:drivetrain_can_position_fbs", |
| 813 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
| 814 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
| 815 | ], |
| 816 | ) |
| 817 | |
| 818 | cc_test( |
| 819 | name = "drivetrain_encoder_fault_detector_test", |
| 820 | srcs = ["drivetrain_encoder_fault_detector_test.cc"], |
| 821 | data = [":simulation_config"], |
| 822 | target_compatible_with = ["@platforms//os:linux"], |
| 823 | deps = [ |
| 824 | ":drivetrain_encoder_fault_detector", |
| 825 | "//aos:json_to_flatbuffer", |
| 826 | "//aos/events:simulated_event_loop", |
| 827 | "//aos/testing:googletest", |
| 828 | ], |
| 829 | ) |
| 830 | |
James Kuszmaul | f4ede20 | 2020-02-14 08:47:40 -0800 | [diff] [blame] | 831 | cc_test( |
| 832 | name = "camera_test", |
| 833 | srcs = ["camera_test.cc"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 834 | target_compatible_with = ["@platforms//os:linux"], |
James Kuszmaul | f4ede20 | 2020-02-14 08:47:40 -0800 | [diff] [blame] | 835 | deps = [ |
| 836 | ":camera", |
| 837 | "//aos/testing:googletest", |
| 838 | ], |
| 839 | ) |
James Kuszmaul | c4ae11c | 2020-12-26 16:26:58 -0800 | [diff] [blame] | 840 | |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 841 | ts_project( |
James Kuszmaul | ac2b6b4 | 2021-03-07 22:38:06 -0800 | [diff] [blame] | 842 | name = "down_estimator_plotter", |
| 843 | srcs = ["down_estimator_plotter.ts"], |
| 844 | target_compatible_with = ["@platforms//os:linux"], |
| 845 | deps = [ |
| 846 | "//aos/network/www:aos_plotter", |
| 847 | "//aos/network/www:colors", |
| 848 | "//aos/network/www:proxy", |
| 849 | "//frc971/wpilib:imu_plot_utils", |
| 850 | ], |
| 851 | ) |
| 852 | |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 853 | ts_project( |
James Kuszmaul | 73fc135 | 2021-04-09 22:31:25 -0700 | [diff] [blame] | 854 | name = "spline_plotter", |
| 855 | srcs = ["spline_plotter.ts"], |
| 856 | target_compatible_with = ["@platforms//os:linux"], |
| 857 | deps = [ |
| 858 | "//aos/network/www:aos_plotter", |
| 859 | "//aos/network/www:colors", |
| 860 | "//aos/network/www:proxy", |
| 861 | ], |
| 862 | ) |
| 863 | |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 864 | ts_project( |
James Kuszmaul | c4ae11c | 2020-12-26 16:26:58 -0800 | [diff] [blame] | 865 | name = "drivetrain_plotter", |
| 866 | srcs = ["drivetrain_plotter.ts"], |
| 867 | target_compatible_with = ["@platforms//os:linux"], |
| 868 | deps = [ |
| 869 | "//aos/network/www:aos_plotter", |
James Kuszmaul | 933a974 | 2021-03-07 19:59:06 -0800 | [diff] [blame] | 870 | "//aos/network/www:colors", |
James Kuszmaul | c4ae11c | 2020-12-26 16:26:58 -0800 | [diff] [blame] | 871 | "//aos/network/www:proxy", |
| 872 | "//frc971/wpilib:imu_plot_utils", |
| 873 | ], |
| 874 | ) |
milind upadhyay | 9bd381d | 2021-01-23 13:44:13 -0800 | [diff] [blame] | 875 | |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 876 | ts_project( |
milind upadhyay | 9bd381d | 2021-01-23 13:44:13 -0800 | [diff] [blame] | 877 | name = "robot_state_plotter", |
| 878 | srcs = ["robot_state_plotter.ts"], |
| 879 | target_compatible_with = ["@platforms//os:linux"], |
| 880 | deps = [ |
| 881 | "//aos/network/www:aos_plotter", |
James Kuszmaul | 933a974 | 2021-03-07 19:59:06 -0800 | [diff] [blame] | 882 | "//aos/network/www:colors", |
milind upadhyay | 9bd381d | 2021-01-23 13:44:13 -0800 | [diff] [blame] | 883 | "//aos/network/www:proxy", |
| 884 | ], |
| 885 | ) |
James Kuszmaul | 6802533 | 2024-01-20 17:06:02 -0800 | [diff] [blame] | 886 | |
| 887 | static_flatbuffer( |
| 888 | name = "drivetrain_config_fbs", |
| 889 | srcs = ["drivetrain_config.fbs"], |
| 890 | visibility = ["//visibility:public"], |
| 891 | deps = ["//frc971/control_loops:state_feedback_loop_fbs"], |
| 892 | ) |
James Kuszmaul | 62c3bd8 | 2024-01-17 20:03:05 -0800 | [diff] [blame] | 893 | |
| 894 | cc_binary( |
| 895 | name = "drivetrain_config_merge", |
| 896 | srcs = ["drivetrain_config_merge.cc"], |
| 897 | visibility = ["//visibility:public"], |
| 898 | deps = [ |
| 899 | ":drivetrain_config_fbs", |
| 900 | "//aos:flatbuffer_merge", |
| 901 | "//aos:init", |
| 902 | "//aos:json_to_flatbuffer", |
| 903 | ], |
| 904 | ) |
| 905 | |
| 906 | cc_test( |
| 907 | name = "drivetrain_config_test", |
| 908 | srcs = ["drivetrain_config_test.cc"], |
| 909 | data = [":drivetrain_test_config.json"], |
| 910 | deps = [ |
| 911 | ":drivetrain_config_fbs", |
| 912 | ":drivetrain_test_lib", |
| 913 | "//aos/testing:googletest", |
| 914 | "//aos/testing:path", |
| 915 | ], |
| 916 | ) |
| 917 | |
| 918 | jinja2_template( |
| 919 | name = "drivetrain_test_config.json", |
| 920 | src = "drivetrain_test_config.jinja2.json", |
| 921 | includes = [ |
| 922 | "//y2016/control_loops/drivetrain:drivetrain_config", |
| 923 | ], |
| 924 | parameters = {}, |
| 925 | visibility = ["//visibility:public"], |
| 926 | ) |