blob: 2dde9a4e67525dbb5192210f3b0ed1618d089909 [file] [log] [blame]
milind-ufbc48c92023-01-21 12:56:16 -08001py_binary(
2 name = "create_calib_file",
3 srcs = [
4 "create_calib_file.py",
5 ],
6 args = [
7 "calibration_data.h",
8 ],
9 data = glob(["calib_files/*.json"]),
10 target_compatible_with = ["@platforms//os:linux"],
11 visibility = ["//visibility:public"],
12 deps = [
13 "//frc971/vision:create_calib_file",
14 ],
15)
16
17genrule(
18 name = "run_calibration_data",
19 outs = [
20 "calibration_data.h",
21 ],
22 cmd = " ".join([
23 "$(location :create_calib_file)",
24 "$(location calibration_data.h)",
25 ]),
26 target_compatible_with = ["@platforms//os:linux"],
27 tools = [
28 ":create_calib_file",
29 ],
30)
31
32cc_library(
33 name = "calibration_data",
34 hdrs = [
35 "calibration_data.h",
36 ],
37 target_compatible_with = ["@platforms//os:linux"],
38 visibility = ["//visibility:public"],
39 deps = [
40 "@com_google_absl//absl/types:span",
41 ],
42)
43
Austin Schuhdb2ed9d2022-12-26 14:02:26 -080044cc_binary(
45 name = "camera_reader",
46 srcs = [
47 "camera_reader.cc",
Ravago Jonese8700072023-01-14 19:41:56 -080048 "rkisp1-config.h",
Austin Schuhdb2ed9d2022-12-26 14:02:26 -080049 ],
Ravago Jonese8700072023-01-14 19:41:56 -080050 target_compatible_with = [
51 "@platforms//os:linux",
52 "//tools/platforms/hardware:raspberry_pi",
53 ],
Austin Schuhdb2ed9d2022-12-26 14:02:26 -080054 visibility = ["//y2023:__subpackages__"],
55 deps = [
56 "//aos:init",
57 "//aos/events:shm_event_loop",
58 "//frc971/vision:media_device",
59 "//frc971/vision:v4l2_reader",
60 ],
61)
62
63cc_binary(
64 name = "viewer",
65 srcs = [
66 "viewer.cc",
67 ],
68 target_compatible_with = ["@platforms//os:linux"],
69 visibility = ["//y2023:__subpackages__"],
70 deps = [
71 "//aos:init",
72 "//aos/events:shm_event_loop",
73 "//frc971/vision:vision_fbs",
74 "//third_party:opencv",
75 ],
76)
milind-u16e3a082023-01-21 13:53:43 -080077
78cc_binary(
79 name = "target_mapping",
80 srcs = [
81 "target_mapping.cc",
82 ],
83 data = [
84 "//y2023:aos_config",
85 ],
86 target_compatible_with = ["@platforms//os:linux"],
87 visibility = ["//y2023:__subpackages__"],
88 deps = [
milind-u09fb1252023-01-28 19:21:41 -080089 ":aprilrobotics_lib",
milind-u16e3a082023-01-21 13:53:43 -080090 ":calibration_data",
91 "//aos:init",
92 "//aos/events:simulated_event_loop",
93 "//aos/events/logging:log_reader",
94 "//frc971/control_loops:pose",
95 "//frc971/vision:calibration_fbs",
96 "//frc971/vision:charuco_lib",
97 "//frc971/vision:target_mapper",
98 "//third_party:opencv",
99 ],
100)
Maxwell Hendersonfebee252023-01-28 16:53:52 -0800101
Ravago Jonesb84f2062023-01-29 13:46:59 -0800102cc_library(
103 name = "aprilrobotics_lib",
Maxwell Hendersonfebee252023-01-28 16:53:52 -0800104 srcs = [
105 "aprilrobotics.cc",
106 "aprilrobotics.h",
107 ],
108 target_compatible_with = ["@platforms//os:linux"],
109 visibility = ["//y2023:__subpackages__"],
110 deps = [
111 ":calibration_data",
112 "//aos:init",
113 "//aos/events:shm_event_loop",
114 "//frc971/vision:calibration_fbs",
115 "//frc971/vision:charuco_lib",
116 "//frc971/vision:target_map_fbs",
117 "//frc971/vision:target_mapper",
118 "//frc971/vision:vision_fbs",
119 "//third_party:opencv",
120 "//third_party/apriltag",
121 ],
122)
Ravago Jonesb84f2062023-01-29 13:46:59 -0800123
124cc_binary(
125 name = "aprilrobotics",
126 srcs = [
127 "aprilrobotics_main.cc",
128 ],
129 target_compatible_with = ["@platforms//os:linux"],
130 visibility = ["//y2023:__subpackages__"],
131 deps = [
132 ":aprilrobotics_lib",
133 "//aos:init",
134 "//aos/events:shm_event_loop",
135 ],
136)