Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 1 | load("//frc971:downloader.bzl", "robot_downloader") |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 2 | load("//aos:config.bzl", "aos_config") |
Michael Schuh | 5a1a758 | 2019-03-01 13:03:47 -0800 | [diff] [blame] | 3 | load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library") |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 4 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library") |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 5 | |
| 6 | robot_downloader( |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 7 | data = [ |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 8 | ":aos_config", |
Austin Schuh | de605f1 | 2022-02-23 23:08:19 -0800 | [diff] [blame] | 9 | "@ctre_phoenix_api_cpp_athena//:shared_libraries", |
| 10 | "@ctre_phoenix_cci_athena//:shared_libraries", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 11 | ], |
Austin Schuh | 635e8bf | 2019-03-23 18:53:15 -0700 | [diff] [blame] | 12 | dirs = [ |
| 13 | "//y2019/vision/server:www_files", |
| 14 | ], |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 15 | start_binaries = [ |
| 16 | ":joystick_reader", |
| 17 | ":wpilib_interface", |
| 18 | "//y2019/control_loops/drivetrain:drivetrain", |
James Kuszmaul | 75a18c5 | 2021-03-10 22:02:07 -0800 | [diff] [blame] | 19 | "//y2019/control_loops/drivetrain:trajectory_generator", |
Austin Schuh | 355f327 | 2019-02-15 23:09:29 -0800 | [diff] [blame] | 20 | "//y2019/control_loops/superstructure:superstructure", |
Austin Schuh | 986091a | 2019-03-22 20:35:12 -0700 | [diff] [blame] | 21 | "//y2019/actors:binaries", |
Austin Schuh | 635e8bf | 2019-03-23 18:53:15 -0700 | [diff] [blame] | 22 | "//y2019/vision/server", |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 23 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 24 | target_compatible_with = ["@platforms//os:linux"], |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 25 | ) |
| 26 | |
Tyler Chatow | 37ecdcd | 2019-01-26 20:18:42 -0800 | [diff] [blame] | 27 | cc_library( |
| 28 | name = "constants", |
| 29 | srcs = [ |
| 30 | "constants.cc", |
| 31 | ], |
| 32 | hdrs = [ |
| 33 | "constants.h", |
| 34 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 35 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | 37ecdcd | 2019-01-26 20:18:42 -0800 | [diff] [blame] | 36 | visibility = ["//visibility:public"], |
| 37 | deps = [ |
Tyler Chatow | 37ecdcd | 2019-01-26 20:18:42 -0800 | [diff] [blame] | 38 | "//aos/network:team_number", |
Brian Silverman | 1463c09 | 2020-10-30 17:28:24 -0700 | [diff] [blame] | 39 | "//aos/stl_mutex", |
Tyler Chatow | 37ecdcd | 2019-01-26 20:18:42 -0800 | [diff] [blame] | 40 | "//frc971:constants", |
James Kuszmaul | 22c5ab3 | 2019-02-09 14:45:58 -0800 | [diff] [blame] | 41 | "//frc971/control_loops:pose", |
Theo Bafrali | 00e4227 | 2019-02-12 01:07:46 -0800 | [diff] [blame] | 42 | "//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem", |
James Kuszmaul | f4ede20 | 2020-02-14 08:47:40 -0800 | [diff] [blame] | 43 | "//frc971/control_loops/drivetrain:camera", |
James Kuszmaul | ec635d2 | 2023-08-12 18:39:24 -0700 | [diff] [blame] | 44 | "//frc971/zeroing:absolute_encoder", |
| 45 | "//frc971/zeroing:pot_and_absolute_encoder", |
Sabina Davis | 7be49f3 | 2019-02-02 00:30:19 -0800 | [diff] [blame] | 46 | "//y2019/control_loops/drivetrain:polydrivetrain_plants", |
Alex Perry | 5fb5ff2 | 2019-02-09 21:53:17 -0800 | [diff] [blame] | 47 | "//y2019/control_loops/superstructure/elevator:elevator_plants", |
| 48 | "//y2019/control_loops/superstructure/intake:intake_plants", |
| 49 | "//y2019/control_loops/superstructure/stilts:stilts_plants", |
Austin Schuh | c1d6f83 | 2019-02-15 23:22:17 -0800 | [diff] [blame] | 50 | "//y2019/control_loops/superstructure/wrist:wrist_plants", |
James Kuszmaul | e2c71ea | 2019-03-04 08:14:21 -0800 | [diff] [blame] | 51 | "//y2019/vision:constants", |
Brian Silverman | f4d329c | 2021-11-04 19:32:10 -0700 | [diff] [blame] | 52 | "@com_github_google_glog//:glog", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 53 | "@com_google_absl//absl/base", |
Tyler Chatow | 37ecdcd | 2019-01-26 20:18:42 -0800 | [diff] [blame] | 54 | ], |
| 55 | ) |
| 56 | |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 57 | cc_binary( |
| 58 | name = "wpilib_interface", |
| 59 | srcs = [ |
| 60 | "wpilib_interface.cc", |
| 61 | ], |
Brian Silverman | 7be68ba | 2020-01-08 22:08:40 -0800 | [diff] [blame] | 62 | # This library uses some deprecated parts of the SPI API. |
| 63 | copts = ["-Wno-deprecated-declarations"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 64 | target_compatible_with = ["//tools/platforms/hardware:roborio"], |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 65 | deps = [ |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 66 | ":camera_log_fbs", |
Sabina Davis | 7be49f3 | 2019-02-02 00:30:19 -0800 | [diff] [blame] | 67 | ":constants", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 68 | ":status_light_fbs", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 69 | "//aos:init", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 70 | "//aos:math", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 71 | "//aos/events:shm_event_loop", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 72 | "//aos/logging", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 73 | "//aos/stl_mutex", |
| 74 | "//aos/time", |
| 75 | "//aos/util:log_interval", |
| 76 | "//aos/util:phased_loop", |
| 77 | "//aos/util:wrapping_counter", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 78 | "//frc971/autonomous:auto_mode_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 79 | "//frc971/control_loops:control_loop", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 80 | "//frc971/control_loops:control_loops_fbs", |
| 81 | "//frc971/control_loops/drivetrain:drivetrain_position_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 82 | "//frc971/input:robot_state_fbs", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 83 | "//frc971/wpilib:ADIS16448", |
Austin Schuh | c1d6f83 | 2019-02-15 23:22:17 -0800 | [diff] [blame] | 84 | "//frc971/wpilib:buffered_pcm", |
Sabina Davis | d004fd6 | 2019-02-02 23:51:46 -0800 | [diff] [blame] | 85 | "//frc971/wpilib:drivetrain_writer", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 86 | "//frc971/wpilib:encoder_and_potentiometer", |
| 87 | "//frc971/wpilib:interrupt_edge_counting", |
| 88 | "//frc971/wpilib:joystick_sender", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 89 | "//frc971/wpilib:logging_fbs", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 90 | "//frc971/wpilib:loop_output_handler", |
| 91 | "//frc971/wpilib:pdp_fetcher", |
Sabina Davis | adc5854 | 2019-02-01 22:23:00 -0800 | [diff] [blame] | 92 | "//frc971/wpilib:sensor_reader", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 93 | "//frc971/wpilib:wpilib_interface", |
| 94 | "//frc971/wpilib:wpilib_robot_base", |
Austin Schuh | f6b9463 | 2019-02-02 22:11:27 -0800 | [diff] [blame] | 95 | "//third_party:phoenix", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 96 | "//third_party:wpilib", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 97 | "//y2019/control_loops/drivetrain:camera_fbs", |
| 98 | "//y2019/control_loops/superstructure:superstructure_output_fbs", |
| 99 | "//y2019/control_loops/superstructure:superstructure_position_fbs", |
Brian Silverman | f8b7525 | 2019-02-24 16:13:58 -0800 | [diff] [blame] | 100 | "//y2019/jevois:spi", |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 101 | ], |
| 102 | ) |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 103 | |
Tyler Chatow | d28951f | 2019-02-16 20:12:28 -0800 | [diff] [blame] | 104 | cc_library( |
| 105 | name = "joystick_angle", |
| 106 | srcs = [ |
| 107 | "joystick_angle.cc", |
| 108 | ], |
| 109 | hdrs = [ |
| 110 | "joystick_angle.h", |
| 111 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 112 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | d28951f | 2019-02-16 20:12:28 -0800 | [diff] [blame] | 113 | deps = [ |
James Kuszmaul | 7077d34 | 2021-06-09 20:23:58 -0700 | [diff] [blame] | 114 | "//frc971/input:drivetrain_input", |
Tyler Chatow | c8012ca | 2019-02-18 22:33:01 -0800 | [diff] [blame] | 115 | "//frc971/zeroing:wrap", |
Tyler Chatow | d28951f | 2019-02-16 20:12:28 -0800 | [diff] [blame] | 116 | ], |
| 117 | ) |
| 118 | |
| 119 | cc_test( |
| 120 | name = "joystick_angle_test", |
| 121 | srcs = [ |
| 122 | "joystick_angle_test.cc", |
| 123 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 124 | target_compatible_with = ["@platforms//os:linux"], |
Tyler Chatow | d28951f | 2019-02-16 20:12:28 -0800 | [diff] [blame] | 125 | deps = [ |
| 126 | ":joystick_angle", |
| 127 | "//aos/testing:googletest", |
| 128 | ], |
| 129 | ) |
| 130 | |
Sabina Davis | 1b84afa | 2019-02-09 01:20:21 -0800 | [diff] [blame] | 131 | cc_binary( |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 132 | name = "joystick_reader", |
| 133 | srcs = [ |
| 134 | ":joystick_reader.cc", |
| 135 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 136 | target_compatible_with = ["@platforms//os:linux"], |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 137 | deps = [ |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 138 | ":camera_log_fbs", |
Tyler Chatow | e024145 | 2019-03-08 21:07:50 -0800 | [diff] [blame] | 139 | ":vision_proto", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 140 | "//aos:init", |
| 141 | "//aos/actions:action_lib", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 142 | "//aos/logging", |
| 143 | "//aos/network:team_number", |
| 144 | "//aos/stl_mutex", |
| 145 | "//aos/time", |
| 146 | "//aos/util:log_interval", |
| 147 | "//aos/vision/events:udp", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 148 | "//frc971/autonomous:auto_fbs", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 149 | "//frc971/autonomous:base_autonomous_actor", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 150 | "//frc971/control_loops:profiled_subsystem_fbs", |
| 151 | "//frc971/control_loops/drivetrain:localizer_fbs", |
Austin Schuh | 0a3c9d4 | 2021-07-15 22:36:24 -0700 | [diff] [blame] | 152 | "//frc971/input:action_joystick_input", |
| 153 | "//frc971/input:drivetrain_input", |
| 154 | "//frc971/input:joystick_input", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 155 | "//y2019/control_loops/drivetrain:drivetrain_base", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 156 | "//y2019/control_loops/drivetrain:target_selector_fbs", |
| 157 | "//y2019/control_loops/superstructure:superstructure_goal_fbs", |
| 158 | "//y2019/control_loops/superstructure:superstructure_position_fbs", |
| 159 | "//y2019/control_loops/superstructure:superstructure_status_fbs", |
Tyler Chatow | e024145 | 2019-03-08 21:07:50 -0800 | [diff] [blame] | 160 | "@com_google_protobuf//:protobuf", |
Sabina Davis | 91b2360 | 2019-01-21 00:06:01 -0800 | [diff] [blame] | 161 | ], |
| 162 | ) |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 163 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 164 | flatbuffer_cc_library( |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 165 | name = "camera_log_fbs", |
| 166 | srcs = [ |
| 167 | "camera_log.fbs", |
| 168 | ], |
| 169 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 170 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 171 | visibility = ["//visibility:public"], |
| 172 | ) |
| 173 | |
| 174 | flatbuffer_cc_library( |
| 175 | name = "status_light_fbs", |
Sabina Davis | c632934 | 2019-03-01 20:44:42 -0800 | [diff] [blame] | 176 | srcs = [ |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 177 | "status_light.fbs", |
| 178 | ], |
| 179 | gen_reflections = 1, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 180 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 181 | visibility = ["//visibility:public"], |
| 182 | ) |
| 183 | |
| 184 | aos_config( |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 185 | name = "aos_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 186 | src = "y2019.json", |
| 187 | flatbuffers = [ |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 188 | ":status_light_fbs", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 189 | "//y2019/control_loops/drivetrain:camera_fbs", |
| 190 | "//y2019/control_loops/drivetrain:target_selector_fbs", |
| 191 | "//y2019/control_loops/superstructure:superstructure_goal_fbs", |
| 192 | "//y2019/control_loops/superstructure:superstructure_output_fbs", |
| 193 | "//y2019/control_loops/superstructure:superstructure_position_fbs", |
| 194 | "//y2019/control_loops/superstructure:superstructure_status_fbs", |
Austin Schuh | ed5b26d | 2019-12-05 20:51:59 -0800 | [diff] [blame] | 195 | ":camera_log_fbs", |
Sabina Davis | c632934 | 2019-03-01 20:44:42 -0800 | [diff] [blame] | 196 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 197 | target_compatible_with = ["@platforms//os:linux"], |
Sabina Davis | c632934 | 2019-03-01 20:44:42 -0800 | [diff] [blame] | 198 | visibility = ["//visibility:public"], |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 199 | deps = [ |
Austin Schuh | c5fa6d9 | 2022-02-25 14:36:28 -0800 | [diff] [blame] | 200 | "//frc971/autonomous:aos_config", |
| 201 | "//frc971/control_loops/drivetrain:aos_config", |
| 202 | "//frc971/input:aos_config", |
| 203 | "//frc971/wpilib:aos_config", |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 204 | ], |
Sabina Davis | c632934 | 2019-03-01 20:44:42 -0800 | [diff] [blame] | 205 | ) |
| 206 | |
Michael Schuh | 5a1a758 | 2019-03-01 13:03:47 -0800 | [diff] [blame] | 207 | cc_proto_library( |
| 208 | name = "vision_proto", |
| 209 | srcs = ["vision.proto"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 210 | target_compatible_with = ["@platforms//os:linux"], |
Michael Schuh | 5a1a758 | 2019-03-01 13:03:47 -0800 | [diff] [blame] | 211 | visibility = ["//visibility:public"], |
| 212 | ) |
| 213 | |
Michael Schuh | ab42b0a | 2019-01-07 16:33:43 -0800 | [diff] [blame] | 214 | py_library( |
| 215 | name = "python_init", |
| 216 | srcs = ["__init__.py"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 217 | target_compatible_with = ["@platforms//os:linux"], |
Michael Schuh | ab42b0a | 2019-01-07 16:33:43 -0800 | [diff] [blame] | 218 | visibility = ["//visibility:public"], |
Sabina Davis | abeae33 | 2019-02-01 21:12:57 -0800 | [diff] [blame] | 219 | ) |