Ariv Diggi | 0af59c0 | 2023-10-07 13:15:39 -0700 | [diff] [blame] | 1 | load("//aos:config.bzl", "aos_config") |
| 2 | load("//aos/util:config_validator_macro.bzl", "config_validator_test") |
Austin Schuh | 8f99c82 | 2024-05-05 22:43:40 -0700 | [diff] [blame] | 3 | load("//frc971:downloader.bzl", "robot_downloader") |
Ariv Diggi | 0af59c0 | 2023-10-07 13:15:39 -0700 | [diff] [blame] | 4 | |
| 5 | config_validator_test( |
| 6 | name = "config_validator_test", |
| 7 | config = "//y2023_bot3:aos_config", |
| 8 | ) |
| 9 | |
| 10 | robot_downloader( |
| 11 | binaries = [ |
| 12 | "//aos/network:web_proxy_main", |
| 13 | "//aos/events/logging:log_cat", |
| 14 | "//y2023_bot3/constants:constants_sender", |
| 15 | "//aos/events:aos_timing_report_streamer", |
| 16 | ], |
| 17 | data = [ |
| 18 | ":aos_config", |
| 19 | "//aos/starter:roborio_irq_config.json", |
| 20 | "@ctre_phoenix6_api_cpp_athena//:shared_libraries", |
| 21 | "@ctre_phoenix6_tools_athena//:shared_libraries", |
| 22 | "@ctre_phoenix_api_cpp_athena//:shared_libraries", |
| 23 | "@ctre_phoenix_cci_athena//:shared_libraries", |
| 24 | ], |
| 25 | dirs = [ |
| 26 | "//y2023_bot3/www:www_files", |
| 27 | "//y2023_bot3/autonomous:splines", |
| 28 | ], |
| 29 | start_binaries = [ |
| 30 | "//aos/events/logging:logger_main", |
| 31 | "//aos/network:web_proxy_main", |
| 32 | "//aos/starter:irq_affinity", |
| 33 | "//y2023_bot3/autonomous:binaries", |
| 34 | ":joystick_reader", |
| 35 | ":wpilib_interface", |
| 36 | "//frc971/can_logger", |
| 37 | "//aos/network:message_bridge_client", |
| 38 | "//aos/network:message_bridge_server", |
| 39 | "//y2023_bot3/control_loops/drivetrain:drivetrain", |
| 40 | "//y2023_bot3/control_loops/drivetrain:trajectory_generator", |
| 41 | "//y2023_bot3/control_loops/superstructure:superstructure", |
| 42 | ], |
| 43 | target_compatible_with = ["@platforms//os:linux"], |
| 44 | ) |
| 45 | |
| 46 | robot_downloader( |
| 47 | name = "pi_download", |
| 48 | binaries = [ |
| 49 | "//aos/starter:irq_affinity", |
| 50 | "//aos/util:foxglove_websocket", |
| 51 | "//aos/events:aos_timing_report_streamer", |
| 52 | "//y2023_bot3/constants:constants_sender", |
| 53 | "//aos/network:web_proxy_main", |
| 54 | "//aos/events/logging:log_cat", |
| 55 | "//y2023_bot3/rockpi:imu_main", |
| 56 | "//frc971/image_streamer:image_streamer", |
| 57 | ], |
| 58 | data = [ |
| 59 | ":aos_config", |
| 60 | "//frc971/rockpi:rockpi_config.json", |
| 61 | "//y2023_bot3/constants:constants.json", |
| 62 | "//y2023_bot3/www:www_files", |
| 63 | ], |
| 64 | dirs = [ |
| 65 | "//y2023_bot3/www:www_files", |
| 66 | "//frc971/image_streamer/www:www_files", |
| 67 | ], |
| 68 | start_binaries = [ |
| 69 | "//aos/network:message_bridge_client", |
| 70 | "//aos/network:message_bridge_server", |
| 71 | "//aos/network:web_proxy_main", |
| 72 | "//aos/starter:irq_affinity", |
| 73 | "//aos/events/logging:logger_main", |
| 74 | ], |
| 75 | target_compatible_with = ["//tools/platforms/hardware:raspberry_pi"], |
| 76 | target_type = "pi", |
| 77 | ) |
| 78 | |
| 79 | aos_config( |
| 80 | name = "aos_config", |
| 81 | src = "y2023_bot3.json", |
| 82 | flatbuffers = [ |
| 83 | "//aos/network:message_bridge_client_fbs", |
| 84 | "//aos/network:message_bridge_server_fbs", |
| 85 | "//aos/network:timestamp_fbs", |
| 86 | "//frc971/input:robot_state_fbs", |
| 87 | ], |
| 88 | target_compatible_with = ["@platforms//os:linux"], |
| 89 | visibility = ["//visibility:public"], |
| 90 | deps = [ |
| 91 | ":config_imu", |
| 92 | ":config_roborio", |
| 93 | ], |
| 94 | ) |
| 95 | |
| 96 | aos_config( |
| 97 | name = "config_imu", |
| 98 | src = "y2023_bot3_imu.json", |
| 99 | flatbuffers = [ |
| 100 | "//aos/network:message_bridge_client_fbs", |
| 101 | "//aos/network:message_bridge_server_fbs", |
| 102 | "//y2023_bot3/constants:constants_fbs", |
| 103 | "//aos/network:timestamp_fbs", |
| 104 | "//aos/network:remote_message_fbs", |
| 105 | "//frc971/control_loops/drivetrain/localization:localizer_output_fbs", |
| 106 | ], |
| 107 | target_compatible_with = ["@platforms//os:linux"], |
| 108 | visibility = ["//visibility:public"], |
| 109 | deps = [ |
| 110 | "//aos/events:aos_config", |
| 111 | "//frc971/control_loops/drivetrain:aos_config", |
| 112 | ], |
| 113 | ) |
| 114 | |
| 115 | aos_config( |
| 116 | name = "config_roborio", |
| 117 | src = "y2023_bot3_roborio.json", |
| 118 | flatbuffers = [ |
| 119 | "//aos/network:remote_message_fbs", |
| 120 | "//aos/network:message_bridge_client_fbs", |
| 121 | "//aos/network:message_bridge_server_fbs", |
| 122 | "//y2023_bot3/constants:constants_fbs", |
| 123 | "//aos/network:timestamp_fbs", |
| 124 | "//y2019/control_loops/drivetrain:target_selector_fbs", |
| 125 | "//y2023_bot3/control_loops/superstructure:superstructure_goal_fbs", |
| 126 | "//y2023_bot3/control_loops/superstructure:superstructure_output_fbs", |
| 127 | "//y2023_bot3/control_loops/superstructure:superstructure_position_fbs", |
| 128 | "//y2023_bot3/control_loops/superstructure:superstructure_status_fbs", |
| 129 | "//frc971/control_loops/drivetrain:drivetrain_can_position_fbs", |
| 130 | "//frc971:can_configuration_fbs", |
| 131 | "//frc971/can_logger:can_logging_fbs", |
| 132 | ], |
| 133 | target_compatible_with = ["@platforms//os:linux"], |
| 134 | deps = [ |
| 135 | "//aos/events:aos_config", |
| 136 | "//frc971/autonomous:aos_config", |
| 137 | "//frc971/control_loops/drivetrain:aos_config", |
| 138 | "//frc971/input:aos_config", |
| 139 | "//frc971/wpilib:aos_config", |
| 140 | ], |
| 141 | ) |
| 142 | |
| 143 | cc_library( |
| 144 | name = "constants", |
| 145 | srcs = [ |
| 146 | "constants.cc", |
| 147 | ], |
| 148 | hdrs = [ |
| 149 | "constants.h", |
| 150 | ], |
| 151 | visibility = ["//visibility:public"], |
| 152 | deps = [ |
| 153 | "//aos/mutex", |
| 154 | "//aos/network:team_number", |
| 155 | "//frc971:constants", |
| 156 | "//frc971/control_loops:pose", |
| 157 | "//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem", |
| 158 | "//frc971/shooter_interpolation:interpolation", |
Maxwell Henderson | 43684fa | 2023-11-06 11:08:06 -0800 | [diff] [blame] | 159 | "//frc971/zeroing:pot_and_absolute_encoder", |
Ariv Diggi | 0af59c0 | 2023-10-07 13:15:39 -0700 | [diff] [blame] | 160 | "//y2023_bot3/control_loops/drivetrain:polydrivetrain_plants", |
Ariv Diggi | 0af59c0 | 2023-10-07 13:15:39 -0700 | [diff] [blame] | 161 | "@com_google_absl//absl/base", |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 162 | "@com_google_absl//absl/log", |
| 163 | "@com_google_absl//absl/log:check", |
Ariv Diggi | 0af59c0 | 2023-10-07 13:15:39 -0700 | [diff] [blame] | 164 | ], |
| 165 | ) |
| 166 | |
| 167 | cc_binary( |
| 168 | name = "wpilib_interface", |
| 169 | srcs = [ |
| 170 | "wpilib_interface.cc", |
| 171 | ], |
| 172 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
| 173 | deps = [ |
| 174 | ":constants", |
| 175 | "//aos:init", |
| 176 | "//aos:math", |
| 177 | "//aos/containers:sized_array", |
| 178 | "//aos/events:shm_event_loop", |
| 179 | "//aos/logging", |
| 180 | "//aos/stl_mutex", |
| 181 | "//aos/time", |
| 182 | "//aos/util:log_interval", |
| 183 | "//aos/util:phased_loop", |
| 184 | "//aos/util:wrapping_counter", |
| 185 | "//frc971:can_configuration_fbs", |
| 186 | "//frc971/autonomous:auto_mode_fbs", |
| 187 | "//frc971/control_loops:control_loop", |
| 188 | "//frc971/control_loops:control_loops_fbs", |
| 189 | "//frc971/control_loops/drivetrain:drivetrain_can_position_fbs", |
| 190 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
| 191 | "//frc971/input:robot_state_fbs", |
| 192 | "//frc971/queues:gyro_fbs", |
| 193 | "//frc971/wpilib:ADIS16448", |
| 194 | "//frc971/wpilib:buffered_pcm", |
| 195 | "//frc971/wpilib:drivetrain_writer", |
| 196 | "//frc971/wpilib:encoder_and_potentiometer", |
| 197 | "//frc971/wpilib:interrupt_edge_counting", |
| 198 | "//frc971/wpilib:joystick_sender", |
| 199 | "//frc971/wpilib:logging_fbs", |
| 200 | "//frc971/wpilib:loop_output_handler", |
| 201 | "//frc971/wpilib:pdp_fetcher", |
| 202 | "//frc971/wpilib:sensor_reader", |
| 203 | "//frc971/wpilib:wpilib_interface", |
| 204 | "//frc971/wpilib:wpilib_robot_base", |
| 205 | "//third_party:phoenix", |
| 206 | "//third_party:phoenix6", |
| 207 | "//third_party:wpilib", |
| 208 | "//y2023_bot3/control_loops/superstructure:led_indicator_lib", |
| 209 | "//y2023_bot3/control_loops/superstructure:superstructure_output_fbs", |
| 210 | "//y2023_bot3/control_loops/superstructure:superstructure_position_fbs", |
| 211 | ], |
| 212 | ) |
| 213 | |
| 214 | cc_binary( |
| 215 | name = "joystick_reader", |
| 216 | srcs = [ |
| 217 | ":joystick_reader.cc", |
| 218 | ], |
| 219 | deps = [ |
| 220 | ":constants", |
| 221 | "//aos:init", |
| 222 | "//aos/actions:action_lib", |
| 223 | "//aos/logging", |
| 224 | "//frc971/autonomous:auto_fbs", |
| 225 | "//frc971/autonomous:base_autonomous_actor", |
| 226 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 227 | "//frc971/input:action_joystick_input", |
| 228 | "//frc971/input:drivetrain_input", |
| 229 | "//frc971/input:joystick_input", |
| 230 | "//frc971/input:redundant_joystick_data", |
| 231 | "//y2023_bot3/control_loops/drivetrain:drivetrain_base", |
| 232 | "//y2023_bot3/control_loops/superstructure:superstructure_goal_fbs", |
| 233 | "//y2023_bot3/control_loops/superstructure:superstructure_status_fbs", |
| 234 | ], |
| 235 | ) |
| 236 | |
| 237 | py_library( |
| 238 | name = "python_init", |
| 239 | srcs = ["__init__.py"], |
| 240 | target_compatible_with = ["@platforms//os:linux"], |
| 241 | visibility = ["//visibility:public"], |
| 242 | ) |