blob: 2ddb735c75a73e5816418fe008346e182ca5e8a6 [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",
Ravago Jones17e13a22023-01-28 17:12:11 -080072 "//aos:json_to_flatbuffer",
Austin Schuhdb2ed9d2022-12-26 14:02:26 -080073 "//aos/events:shm_event_loop",
74 "//frc971/vision:vision_fbs",
75 "//third_party:opencv",
Ravago Jones17e13a22023-01-28 17:12:11 -080076 "@com_google_absl//absl/strings",
Austin Schuhdb2ed9d2022-12-26 14:02:26 -080077 ],
78)
milind-u16e3a082023-01-21 13:53:43 -080079
80cc_binary(
81 name = "target_mapping",
82 srcs = [
83 "target_mapping.cc",
84 ],
85 data = [
86 "//y2023:aos_config",
87 ],
88 target_compatible_with = ["@platforms//os:linux"],
89 visibility = ["//y2023:__subpackages__"],
90 deps = [
milind-u09fb1252023-01-28 19:21:41 -080091 ":aprilrobotics_lib",
milind-u16e3a082023-01-21 13:53:43 -080092 ":calibration_data",
93 "//aos:init",
94 "//aos/events:simulated_event_loop",
95 "//aos/events/logging:log_reader",
96 "//frc971/control_loops:pose",
97 "//frc971/vision:calibration_fbs",
98 "//frc971/vision:charuco_lib",
99 "//frc971/vision:target_mapper",
100 "//third_party:opencv",
101 ],
102)
Maxwell Hendersonfebee252023-01-28 16:53:52 -0800103
Ravago Jonesb84f2062023-01-29 13:46:59 -0800104cc_library(
105 name = "aprilrobotics_lib",
Maxwell Hendersonfebee252023-01-28 16:53:52 -0800106 srcs = [
107 "aprilrobotics.cc",
108 "aprilrobotics.h",
109 ],
110 target_compatible_with = ["@platforms//os:linux"],
111 visibility = ["//y2023:__subpackages__"],
112 deps = [
113 ":calibration_data",
114 "//aos:init",
115 "//aos/events:shm_event_loop",
116 "//frc971/vision:calibration_fbs",
117 "//frc971/vision:charuco_lib",
118 "//frc971/vision:target_map_fbs",
119 "//frc971/vision:target_mapper",
120 "//frc971/vision:vision_fbs",
121 "//third_party:opencv",
122 "//third_party/apriltag",
123 ],
124)
Ravago Jonesb84f2062023-01-29 13:46:59 -0800125
126cc_binary(
127 name = "aprilrobotics",
128 srcs = [
129 "aprilrobotics_main.cc",
130 ],
131 target_compatible_with = ["@platforms//os:linux"],
132 visibility = ["//y2023:__subpackages__"],
133 deps = [
134 ":aprilrobotics_lib",
135 "//aos:init",
136 "//aos/events:shm_event_loop",
137 ],
138)