forked from frc971/971-Robot-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBUILD
302 lines (290 loc) · 10.3 KB
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
load("//aos:config.bzl", "aos_config")
load("//aos/util:config_validator_macro.bzl", "config_validator_test")
load("//frc971:downloader.bzl", "robot_downloader")
config_validator_test(
name = "config_validator_test",
config = "//y2024_bot3:aos_config",
)
robot_downloader(
binaries = [
"//aos/network:web_proxy_main",
"//aos/events/logging:log_cat",
"//y2024_bot3/constants:constants_sender",
"//aos/events:aos_timing_report_streamer",
"//aos/events/logging:logger_main",
"//aos/starter:irq_affinity",
":joystick_reader",
":wpilib_interface",
"//frc971/can_logger",
"//aos/network:message_bridge_client",
"//aos/network:message_bridge_server",
"//y2024_bot3/control_loops/superstructure:superstructure",
],
data = [
":aos_config",
"//aos/starter:roborio_irq_config.json",
"//y2024_bot3/constants:constants.json",
"@ctre_phoenix6_api_cpp_athena//:shared_libraries",
"@ctre_phoenix6_tools_athena//:shared_libraries",
"@ctre_phoenix_api_cpp_athena//:shared_libraries",
"@ctre_phoenix_cci_athena//:shared_libraries",
],
dirs = [
"//y2024_bot3/www:www_files",
],
target_compatible_with = ["@platforms//os:linux"],
)
robot_downloader(
name = "orin_download",
binaries = [
"//frc971/wpilib:joystick_republish",
"//aos/events:aos_timing_report_streamer",
"//aos/events/logging:log_cat",
"//aos:aos_jitter",
"//aos/network:web_proxy_main",
"//aos/starter:irq_affinity",
"//aos/util:foxglove_websocket",
"//frc971/image_streamer:image_streamer",
"//frc971/orin:hardware_monitor",
"//frc971/orin:argus_monitor",
"//frc971/vision:intrinsics_calibration",
"//aos/util:filesystem_monitor",
"//y2024_bot3/vision:viewer",
"//y2024_bot3/constants:constants_sender",
"//frc971/orin:localizer_logger",
"//frc971/vision:foxglove_image_converter",
"//aos/events/logging:logger_main",
"//frc971/imu_fdcan:can_translator",
"//frc971/imu_fdcan:dual_imu_blender",
"//aos/network:message_bridge_client",
"//aos/network:message_bridge_server",
"//frc971/orin:argus_camera",
"//y2024_bot3/orin:can_logger",
"//y2024_bot3/vision:apriltag_detector",
"//frc971/vision:image_logger",
],
data = [
":aos_config",
"//frc971/orin:orin_irq_config.json",
"//y2024_bot3/constants:constants.json",
"//y2024_bot3/vision:image_streamer_start",
"//y2024_bot3/www:www_files",
],
dirs = [
"//y2024_bot3/www:www_files",
"//frc971/image_streamer/www:www_files",
],
target_compatible_with = ["//tools/platforms/hardware:raspberry_pi"],
target_type = "pi",
)
aos_config(
name = "aos_config",
src = "y2024_bot3.json",
flatbuffers = [
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
"//aos/network:timestamp_fbs",
"//frc971/input:robot_state_fbs",
"//frc971/vision:vision_fbs",
"//frc971/vision:target_map_fbs",
],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
deps = [
":config_imu",
":config_orin1",
":config_roborio",
],
)
aos_config(
name = "config_imu",
src = "y2024_bot3_imu.json",
flatbuffers = [
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
"//frc971/imu_fdcan:dual_imu_fbs",
"//frc971/imu_fdcan:can_translator_status_fbs",
"//frc971/imu_fdcan:dual_imu_blender_status_fbs",
"//y2024_bot3/constants:constants_fbs",
"//frc971/control_loops/drivetrain/localization:localizer_output_fbs",
"//frc971/can_logger:can_logging_fbs",
"//frc971/orin:hardware_stats_fbs",
"//aos/network:timestamp_fbs",
"//aos/util:filesystem_fbs",
"//aos/network:remote_message_fbs",
"//frc971/vision:calibration_fbs",
"//frc971/vision:target_map_fbs",
"//frc971/vision:vision_fbs",
"@com_github_foxglove_schemas//:schemas",
],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
deps = [
"//aos/events:aos_config",
"//frc971/control_loops/drivetrain:aos_config",
],
)
aos_config(
name = "config_roborio",
src = "y2024_bot3_roborio.json",
flatbuffers = [
"//frc971:can_configuration_fbs",
"//aos/network:remote_message_fbs",
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
"//frc971/wpilib:pdp_values_fbs",
"//y2024_bot3/constants:constants_fbs",
"//aos/network:timestamp_fbs",
"//y2024_bot3/control_loops/superstructure:superstructure_goal_fbs",
"//frc971/control_loops/drivetrain:drivetrain_can_position_fbs",
"//y2024_bot3/control_loops/superstructure:superstructure_can_position_fbs",
"//y2024_bot3/control_loops/superstructure:superstructure_output_fbs",
"//frc971/control_loops/drivetrain:rio_localizer_inputs_fbs",
"//y2024_bot3/control_loops/superstructure:superstructure_position_fbs",
"//frc971/control_loops/drivetrain/localization:localizer_output_fbs",
"//y2024_bot3/control_loops/superstructure:superstructure_status_fbs",
"//frc971/can_logger:can_logging_fbs",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//aos/events:aos_config",
"//frc971/control_loops/drivetrain:aos_config",
"//frc971/input:aos_config",
],
)
aos_config(
name = "config_orin1",
src = "y2024_bot3_orin1.json",
flatbuffers = [
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
"//aos/network:timestamp_fbs",
"//aos/network:remote_message_fbs",
"//y2024_bot3/constants:constants_fbs",
"//frc971/control_loops/drivetrain/localization:localizer_output_fbs",
"//frc971/orin:hardware_stats_fbs",
"//frc971/vision:calibration_fbs",
"//frc971/vision:target_map_fbs",
"//frc971/vision:vision_fbs",
"//aos/util:filesystem_fbs",
"@com_github_foxglove_schemas//:schemas",
],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
deps = [
"//aos/events:aos_config",
"//frc971/control_loops/drivetrain:aos_config",
"//frc971/input:aos_config",
],
)
cc_library(
name = "constants",
srcs = [
"constants.cc",
],
hdrs = [
"constants.h",
],
visibility = ["//visibility:public"],
deps = [
"//aos/mutex",
"//aos/network:team_number",
"//frc971:constants",
"//frc971/control_loops:pose",
"//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem",
"//frc971/zeroing:absolute_encoder",
"//frc971/zeroing:pot_and_absolute_encoder",
"//y2024_bot3/constants:constants_fbs",
"@com_google_absl//absl/base",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
],
)
cc_binary(
name = "wpilib_interface",
srcs = [
"wpilib_interface.cc",
],
target_compatible_with = ["//tools/platforms/hardware:roborio"],
deps = [
":constants",
"//aos:init",
"//aos:math",
"//aos/containers:sized_array",
"//aos/events:shm_event_loop",
"//aos/logging",
"//aos/stl_mutex",
"//aos/time",
"//aos/util:log_interval",
"//aos/util:phased_loop",
"//aos/util:wrapping_counter",
"//frc971:can_configuration_fbs",
"//frc971/constants:constants_sender_lib",
"//frc971/control_loops:control_loop",
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops/drivetrain:drivetrain_can_position_fbs",
"//frc971/control_loops/drivetrain:drivetrain_position_fbs",
"//frc971/input:robot_state_fbs",
"//frc971/queues:gyro_fbs",
"//frc971/wpilib:ADIS16448",
"//frc971/wpilib:buffered_pcm",
"//frc971/wpilib:can_drivetrain_writer",
"//frc971/wpilib:can_sensor_reader",
"//frc971/wpilib:dma",
"//frc971/wpilib:drivetrain_writer",
"//frc971/wpilib:encoder_and_potentiometer",
"//frc971/wpilib:generic_can_writer",
"//frc971/wpilib:joystick_sender",
"//frc971/wpilib:logging_fbs",
"//frc971/wpilib:pdp_fetcher",
"//frc971/wpilib:sensor_reader",
"//frc971/wpilib:talonfx",
"//frc971/wpilib:wpilib_robot_base",
"//third_party:phoenix",
"//third_party:phoenix6",
"//third_party:wpilib",
"//y2024_bot3/constants:constants_fbs",
"//y2024_bot3/control_loops/superstructure:superstructure_can_position_fbs",
"//y2024_bot3/control_loops/superstructure:superstructure_output_fbs",
"//y2024_bot3/control_loops/superstructure:superstructure_position_fbs",
],
)
cc_binary(
name = "joystick_reader",
srcs = [
":joystick_reader.cc",
],
deps = [
":constants",
"//aos:init",
"//aos/actions:action_lib",
"//aos/logging",
"//frc971/constants:constants_sender_lib",
"//frc971/control_loops:profiled_subsystem_fbs",
"//frc971/control_loops:static_zeroing_single_dof_profiled_subsystem",
"//frc971/input:action_joystick_input",
"//frc971/input:drivetrain_input",
"//frc971/input:joystick_input",
"//frc971/input:redundant_joystick_data",
"//y2024_bot3/control_loops/superstructure:superstructure_goal_fbs",
"//y2024_bot3/control_loops/superstructure:superstructure_status_fbs",
],
)
py_library(
name = "python_init",
srcs = ["__init__.py"],
target_compatible_with = ["@platforms//os:linux"],
visibility = ["//visibility:public"],
)
sh_binary(
name = "log_web_proxy",
srcs = ["log_web_proxy.sh"],
data = [
":aos_config",
"//aos/network:log_web_proxy_main",
"//frc971/www:starter_main_bundle.min.js",
"//y2024_bot3/www:field_main_bundle.min.js",
"//y2024_bot3/www:files",
],
target_compatible_with = ["@platforms//os:linux"],
)