blob: cafdfb7d6d24df61ccd5e58be2fc8e560fb7f017 [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 = [
91 ":calibration_data",
92 "//aos:init",
93 "//aos/events:simulated_event_loop",
94 "//aos/events/logging:log_reader",
95 "//frc971/control_loops:pose",
96 "//frc971/vision:calibration_fbs",
97 "//frc971/vision:charuco_lib",
98 "//frc971/vision:target_mapper",
99 "//third_party:opencv",
100 ],
101)