Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 1 | load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 2 | load("//aos/flatbuffers:generate.bzl", "static_flatbuffer") |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 3 | load("//tools/build_rules:js.bzl", "ts_project") |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 4 | |
| 5 | package(default_visibility = ["//visibility:public"]) |
| 6 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 7 | static_flatbuffer( |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 8 | name = "superstructure_goal_fbs", |
| 9 | srcs = [ |
| 10 | "superstructure_goal.fbs", |
| 11 | ], |
James Kuszmaul | 202e438 | 2023-03-05 14:56:55 -0800 | [diff] [blame] | 12 | deps = [ |
| 13 | "//frc971/control_loops:control_loops_fbs", |
| 14 | "//frc971/control_loops:profiled_subsystem_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 15 | ], |
| 16 | ) |
| 17 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 18 | static_flatbuffer( |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 19 | name = "superstructure_output_fbs", |
| 20 | srcs = [ |
| 21 | "superstructure_output.fbs", |
| 22 | ], |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 23 | ) |
| 24 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 25 | static_flatbuffer( |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 26 | name = "superstructure_status_fbs", |
| 27 | srcs = [ |
| 28 | "superstructure_status.fbs", |
| 29 | ], |
James Kuszmaul | 202e438 | 2023-03-05 14:56:55 -0800 | [diff] [blame] | 30 | deps = [ |
| 31 | "//frc971/control_loops:control_loops_fbs", |
| 32 | "//frc971/control_loops:profiled_subsystem_fbs", |
Maxwell Henderson | bf1bcec | 2023-03-05 18:00:20 -0800 | [diff] [blame] | 33 | "//y2023/vision:game_pieces_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 34 | ], |
| 35 | ) |
| 36 | |
| 37 | flatbuffer_ts_library( |
| 38 | name = "superstructure_status_ts_fbs", |
| 39 | srcs = [ |
| 40 | "superstructure_status.fbs", |
| 41 | ], |
| 42 | deps = [ |
| 43 | "//frc971/control_loops:control_loops_ts_fbs", |
| 44 | "//frc971/control_loops:profiled_subsystem_ts_fbs", |
Maxwell Henderson | bf1bcec | 2023-03-05 18:00:20 -0800 | [diff] [blame] | 45 | "//y2023/vision:game_pieces_ts_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 46 | ], |
| 47 | ) |
| 48 | |
James Kuszmaul | f01da39 | 2023-12-14 11:22:14 -0800 | [diff] [blame] | 49 | static_flatbuffer( |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 50 | name = "superstructure_position_fbs", |
| 51 | srcs = [ |
| 52 | "superstructure_position.fbs", |
| 53 | ], |
James Kuszmaul | 202e438 | 2023-03-05 14:56:55 -0800 | [diff] [blame] | 54 | deps = [ |
| 55 | "//frc971/control_loops:control_loops_fbs", |
| 56 | "//frc971/control_loops:profiled_subsystem_fbs", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 57 | "//frc971/control_loops/drivetrain:drivetrain_can_position_fbs", |
James Kuszmaul | 202e438 | 2023-03-05 14:56:55 -0800 | [diff] [blame] | 58 | "//frc971/vision:calibration_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 59 | ], |
| 60 | ) |
| 61 | |
| 62 | cc_library( |
Maxwell Henderson | 589cf27 | 2023-02-22 15:56:40 -0800 | [diff] [blame] | 63 | name = "end_effector", |
| 64 | srcs = [ |
| 65 | "end_effector.cc", |
| 66 | ], |
| 67 | hdrs = [ |
| 68 | "end_effector.h", |
| 69 | ], |
| 70 | deps = [ |
| 71 | ":superstructure_goal_fbs", |
Maxwell Henderson | 589cf27 | 2023-02-22 15:56:40 -0800 | [diff] [blame] | 72 | ":superstructure_status_fbs", |
| 73 | "//aos/events:event_loop", |
| 74 | "//aos/time", |
| 75 | "//frc971/control_loops:control_loop", |
| 76 | "//y2023:constants", |
Maxwell Henderson | bf1bcec | 2023-03-05 18:00:20 -0800 | [diff] [blame] | 77 | "//y2023/vision:game_pieces_fbs", |
Maxwell Henderson | 589cf27 | 2023-02-22 15:56:40 -0800 | [diff] [blame] | 78 | ], |
| 79 | ) |
| 80 | |
| 81 | cc_library( |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 82 | name = "superstructure_lib", |
| 83 | srcs = [ |
| 84 | "superstructure.cc", |
| 85 | ], |
| 86 | hdrs = [ |
| 87 | "superstructure.h", |
| 88 | ], |
Maxwell Henderson | b392b74 | 2023-03-05 07:53:51 -0800 | [diff] [blame] | 89 | data = [ |
| 90 | "//y2023/control_loops/superstructure/arm:arm_trajectories_generated.bfbs", |
| 91 | ], |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 92 | deps = [ |
Maxwell Henderson | 589cf27 | 2023-02-22 15:56:40 -0800 | [diff] [blame] | 93 | ":end_effector", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 94 | ":superstructure_goal_fbs", |
| 95 | ":superstructure_output_fbs", |
| 96 | ":superstructure_position_fbs", |
| 97 | ":superstructure_status_fbs", |
| 98 | "//aos:flatbuffer_merge", |
| 99 | "//aos/events:event_loop", |
James Kuszmaul | cf451fb | 2023-03-10 20:42:36 -0800 | [diff] [blame] | 100 | "//frc971/constants:constants_sender_lib", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 101 | "//frc971/control_loops:control_loop", |
Maxwell Henderson | cef6f04 | 2023-05-26 14:38:09 -0700 | [diff] [blame] | 102 | "//frc971/control_loops/drivetrain:drivetrain_can_position_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 103 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
James Kuszmaul | cf451fb | 2023-03-10 20:42:36 -0800 | [diff] [blame] | 104 | "//frc971/shooter_interpolation:interpolation", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 105 | "//frc971/zeroing:absolute_encoder", |
| 106 | "//frc971/zeroing:pot_and_absolute_encoder", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 107 | "//y2023:constants", |
James Kuszmaul | cf451fb | 2023-03-10 20:42:36 -0800 | [diff] [blame] | 108 | "//y2023/constants:constants_fbs", |
| 109 | "//y2023/constants:simulated_constants_sender", |
milind-u | 01bbcf2 | 2023-02-20 18:00:28 -0800 | [diff] [blame] | 110 | "//y2023/control_loops/superstructure/arm", |
Maxwell Henderson | b392b74 | 2023-03-05 07:53:51 -0800 | [diff] [blame] | 111 | "//y2023/control_loops/superstructure/arm:arm_trajectories_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 112 | ], |
| 113 | ) |
| 114 | |
| 115 | cc_binary( |
| 116 | name = "superstructure", |
| 117 | srcs = [ |
| 118 | "superstructure_main.cc", |
| 119 | ], |
| 120 | deps = [ |
| 121 | ":superstructure_lib", |
| 122 | "//aos:init", |
| 123 | "//aos/events:shm_event_loop", |
| 124 | ], |
| 125 | ) |
| 126 | |
| 127 | cc_test( |
| 128 | name = "superstructure_lib_test", |
| 129 | srcs = [ |
| 130 | "superstructure_lib_test.cc", |
| 131 | ], |
| 132 | data = [ |
| 133 | "//y2023:aos_config", |
| 134 | ], |
| 135 | deps = [ |
| 136 | ":superstructure_goal_fbs", |
| 137 | ":superstructure_lib", |
| 138 | ":superstructure_output_fbs", |
| 139 | ":superstructure_position_fbs", |
| 140 | ":superstructure_status_fbs", |
Maxwell Henderson | b392b74 | 2023-03-05 07:53:51 -0800 | [diff] [blame] | 141 | "//aos:json_to_flatbuffer", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 142 | "//aos:math", |
| 143 | "//aos/events/logging:log_writer", |
| 144 | "//aos/testing:googletest", |
| 145 | "//aos/time", |
| 146 | "//frc971/control_loops:capped_test_plant", |
| 147 | "//frc971/control_loops:control_loop_test", |
| 148 | "//frc971/control_loops:position_sensor_sim", |
| 149 | "//frc971/control_loops:subsystem_simulator", |
| 150 | "//frc971/control_loops:team_number_test_environment", |
| 151 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
milind-u | 18a901d | 2023-02-17 21:51:55 -0800 | [diff] [blame] | 152 | "//y2023/control_loops/superstructure/roll:roll_plants", |
Maxwell Henderson | bf1bcec | 2023-03-05 18:00:20 -0800 | [diff] [blame] | 153 | "//y2023/vision:game_pieces_fbs", |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 154 | ], |
| 155 | ) |
| 156 | |
Maxwell Henderson | 7639114 | 2023-03-11 12:04:45 -0800 | [diff] [blame] | 157 | cc_library( |
| 158 | name = "led_indicator_lib", |
| 159 | srcs = ["led_indicator.cc"], |
| 160 | hdrs = ["led_indicator.h"], |
| 161 | data = [ |
| 162 | "@ctre_phoenix_api_cpp_athena//:shared_libraries", |
| 163 | "@ctre_phoenix_cci_athena//:shared_libraries", |
| 164 | ], |
| 165 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
| 166 | deps = [ |
Austin Schuh | e2663ee | 2023-03-25 20:02:06 -0700 | [diff] [blame] | 167 | ":superstructure_goal_fbs", |
Maxwell Henderson | 7639114 | 2023-03-11 12:04:45 -0800 | [diff] [blame] | 168 | ":superstructure_output_fbs", |
| 169 | ":superstructure_position_fbs", |
| 170 | ":superstructure_status_fbs", |
| 171 | "//aos/events:event_loop", |
| 172 | "//aos/network:message_bridge_client_fbs", |
| 173 | "//aos/network:message_bridge_server_fbs", |
| 174 | "//frc971/control_loops:control_loop", |
| 175 | "//frc971/control_loops:control_loops_fbs", |
| 176 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 177 | "//frc971/control_loops/drivetrain:drivetrain_output_fbs", |
| 178 | "//frc971/control_loops/drivetrain:drivetrain_status_fbs", |
| 179 | "//frc971/control_loops/drivetrain/localization:localizer_output_fbs", |
| 180 | "//frc971/queues:gyro_fbs", |
| 181 | "//third_party:phoenix", |
| 182 | "//third_party:wpilib", |
| 183 | "//y2023/vision:game_pieces_fbs", |
| 184 | ], |
| 185 | ) |
| 186 | |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 187 | cc_binary( |
| 188 | name = "superstructure_replay", |
| 189 | srcs = ["superstructure_replay.cc"], |
| 190 | deps = [ |
| 191 | ":superstructure_lib", |
| 192 | "//aos:configuration", |
| 193 | "//aos:init", |
| 194 | "//aos/events:simulated_event_loop", |
| 195 | "//aos/events/logging:log_reader", |
| 196 | "//aos/network:team_number", |
| 197 | ], |
| 198 | ) |
| 199 | |
Philipp Schrader | 3de4dfc | 2023-02-15 20:18:25 -0800 | [diff] [blame] | 200 | ts_project( |
Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame] | 201 | name = "superstructure_plotter", |
| 202 | srcs = ["superstructure_plotter.ts"], |
| 203 | target_compatible_with = ["@platforms//os:linux"], |
| 204 | deps = [ |
| 205 | "//aos/network/www:aos_plotter", |
| 206 | "//aos/network/www:colors", |
| 207 | "//aos/network/www:proxy", |
| 208 | ], |
| 209 | ) |