-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathBUILD
291 lines (277 loc) · 9.1 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
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_swerve:aos_config",
)
robot_downloader(
binaries = [
"//aos/network:web_proxy_main",
"//aos/events/logging:log_cat",
"//y2024_swerve/constants:constants_sender",
"//aos/events:aos_timing_report_streamer",
":joystick_reader",
"//aos/events/logging:logger_main",
"//aos/starter:irq_affinity",
":wpilib_interface",
":swerve_publisher",
"//y2024_swerve/control_loops:swerve_control_loops",
"//frc971/can_logger",
"//aos/network:message_bridge_client",
"//aos/network:message_bridge_server",
],
data = [
":aos_config",
":swerve_publisher_goal_json",
"//y2024_swerve/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/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_swerve/constants:constants_sender",
"//frc971/vision:foxglove_image_converter",
"//aos/events/logging:logger_main",
"//frc971/imu_fdcan:can_translator",
"//frc971/imu_fdcan:dual_imu_blender",
"//frc971/orin:localizer_logger",
"//frc971/can_logger",
"//aos/network:message_bridge_client",
"//aos/network:message_bridge_server",
"//frc971/orin:argus_camera",
"//y2024_swerve/vision:apriltag_detector",
"//frc971/vision:image_logger",
],
data = [
":aos_config",
"//frc971/orin:orin_irq_config.json",
"//y2024/www:www_files",
"//y2024_swerve/constants:constants.json",
],
dirs = [
"//y2024/www:www_files",
],
target_compatible_with = ["//tools/platforms/hardware:raspberry_pi"],
target_type = "pi",
)
filegroup(
name = "swerve_publisher_goal_json",
srcs = [
"swerve_drivetrain_goal.json",
],
visibility = ["//y2024_swerve:__subpackages__"],
)
cc_library(
name = "constants",
srcs = ["constants.cc"],
hdrs = [
"constants.h",
],
visibility = ["//visibility:public"],
deps = [
"//aos/mutex",
"//aos/network:team_number",
"//frc971:constants",
"//y2024_swerve/constants:constants_fbs",
"@com_google_absl//absl/base",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
],
)
cc_binary(
name = "swerve_publisher",
srcs = ["swerve_publisher_main.cc"],
deps = [
":swerve_publisher_lib",
"//aos/events:shm_event_loop",
"@com_google_absl//absl/flags:flag",
],
)
cc_library(
name = "swerve_publisher_lib",
srcs = ["swerve_publisher_lib.cc"],
hdrs = ["swerve_publisher_lib.h"],
deps = [
"//aos:init",
"//aos/events:event_loop",
"//frc971/control_loops/swerve:swerve_drivetrain_goal_fbs",
"@com_google_absl//absl/log",
"@com_google_absl//absl/log:check",
],
)
cc_test(
name = "swerve_publisher_lib_test",
srcs = [
"swerve_publisher_lib_test.cc",
],
data = [
":aos_config",
":swerve_publisher_goal_json",
],
deps = [
":swerve_publisher_lib",
"//aos/events:simulated_event_loop",
"//aos/testing:googletest",
],
)
cc_binary(
name = "wpilib_interface",
srcs = ["wpilib_interface.cc"],
target_compatible_with = ["//tools/platforms/hardware:roborio"],
deps = [
":constants",
"//aos:init",
"//aos/events:shm_event_loop",
"//frc971/constants:constants_sender_lib",
"//frc971/control_loops:control_loops_fbs",
"//frc971/control_loops/swerve:swerve_drivetrain_can_position_fbs",
"//frc971/control_loops/swerve:swerve_drivetrain_position_fbs",
"//frc971/queues:gyro_fbs",
"//frc971/wpilib:can_sensor_reader",
"//frc971/wpilib:joystick_sender",
"//frc971/wpilib:pdp_fetcher",
"//frc971/wpilib:sensor_reader",
"//frc971/wpilib:talonfx",
"//frc971/wpilib:wpilib_robot_base",
"//frc971/wpilib/swerve:swerve_drivetrain_writer",
"//frc971/wpilib/swerve:swerve_util",
"//y2024_swerve/constants:constants_fbs",
],
)
aos_config(
name = "aos_config",
src = "y2024_swerve.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_roborio",
src = "y2024_swerve_roborio.json",
flatbuffers = [
"//frc971:can_configuration_fbs",
"//frc971/queues:gyro_fbs",
"//aos/network:remote_message_fbs",
"//aos/network:message_bridge_client_fbs",
"//aos/network:message_bridge_server_fbs",
"//aos/network:timestamp_fbs",
"//frc971/control_loops/swerve:swerve_drivetrain_goal_fbs",
"//frc971/control_loops/swerve:swerve_drivetrain_status_fbs",
"//frc971/control_loops/swerve:swerve_drivetrain_output_fbs",
"//frc971/control_loops/swerve:swerve_drivetrain_position_fbs",
"//y2024_swerve/constants:constants_fbs",
"//frc971/control_loops/swerve:swerve_drivetrain_can_position_fbs",
"//frc971/control_loops/drivetrain:drivetrain_can_position_fbs",
"//frc971/can_logger:can_logging_fbs",
],
target_compatible_with = ["@platforms//os:linux"],
deps = [
"//aos/events:aos_config",
"//frc971/autonomous:aos_config",
"//frc971/control_loops/drivetrain:aos_config",
"//frc971/input:aos_config",
"//frc971/wpilib:aos_config",
],
)
aos_config(
name = "config_imu",
src = "y2024_swerve_imu.json",
flatbuffers = [
"//aos/network:message_bridge_client_fbs",
"//y2024_swerve/constants:constants_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",
"//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_orin1",
src = "y2024_swerve_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_swerve/constants:constants_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_binary(
name = "joystick_reader",
srcs = [
":joystick_reader.cc",
],
deps = [
"//aos:init",
"//aos/actions:action_lib",
"//aos/events:shm_event_loop",
"//aos/logging",
"//frc971/input:drivetrain_input",
"//frc971/input:joystick_input",
"//frc971/input:redundant_joystick_data",
"//frc971/input:swerve_joystick_input",
"//y2024/control_loops/drivetrain:drivetrain_base",
"//y2024_swerve/constants:constants_fbs",
],
)