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