milind-u | fbc48c9 | 2023-01-21 12:56:16 -0800 | [diff] [blame] | 1 | py_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 | |
| 17 | genrule( |
| 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 | |
| 32 | cc_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 Schuh | db2ed9d | 2022-12-26 14:02:26 -0800 | [diff] [blame] | 44 | cc_binary( |
| 45 | name = "camera_reader", |
| 46 | srcs = [ |
| 47 | "camera_reader.cc", |
Ravago Jones | e870007 | 2023-01-14 19:41:56 -0800 | [diff] [blame] | 48 | "rkisp1-config.h", |
Austin Schuh | db2ed9d | 2022-12-26 14:02:26 -0800 | [diff] [blame] | 49 | ], |
Ravago Jones | e870007 | 2023-01-14 19:41:56 -0800 | [diff] [blame] | 50 | target_compatible_with = [ |
| 51 | "@platforms//os:linux", |
| 52 | "//tools/platforms/hardware:raspberry_pi", |
| 53 | ], |
Austin Schuh | db2ed9d | 2022-12-26 14:02:26 -0800 | [diff] [blame] | 54 | 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 | |
| 63 | cc_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 Jones | 17e13a2 | 2023-01-28 17:12:11 -0800 | [diff] [blame] | 72 | "//aos:json_to_flatbuffer", |
Austin Schuh | db2ed9d | 2022-12-26 14:02:26 -0800 | [diff] [blame] | 73 | "//aos/events:shm_event_loop", |
| 74 | "//frc971/vision:vision_fbs", |
| 75 | "//third_party:opencv", |
Ravago Jones | 17e13a2 | 2023-01-28 17:12:11 -0800 | [diff] [blame] | 76 | "@com_google_absl//absl/strings", |
Austin Schuh | db2ed9d | 2022-12-26 14:02:26 -0800 | [diff] [blame] | 77 | ], |
| 78 | ) |
milind-u | 16e3a08 | 2023-01-21 13:53:43 -0800 | [diff] [blame] | 79 | |
| 80 | cc_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-u | 09fb125 | 2023-01-28 19:21:41 -0800 | [diff] [blame] | 91 | ":aprilrobotics_lib", |
milind-u | 16e3a08 | 2023-01-21 13:53:43 -0800 | [diff] [blame] | 92 | ":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 Henderson | febee25 | 2023-01-28 16:53:52 -0800 | [diff] [blame] | 103 | |
Ravago Jones | b84f206 | 2023-01-29 13:46:59 -0800 | [diff] [blame] | 104 | cc_library( |
| 105 | name = "aprilrobotics_lib", |
Maxwell Henderson | febee25 | 2023-01-28 16:53:52 -0800 | [diff] [blame] | 106 | 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 Jones | b84f206 | 2023-01-29 13:46:59 -0800 | [diff] [blame] | 125 | |
| 126 | cc_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 | ) |