milind-u | 2f101fc | 2023-01-21 12:28:49 -0800 | [diff] [blame^] | 1 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_py_library") |
Austin Schuh | a1d006e | 2022-09-14 21:50:42 -0700 | [diff] [blame] | 2 | load("@com_github_google_flatbuffers//:typescript.bzl", "flatbuffer_ts_library") |
Jim Ostrowski | 977850f | 2022-01-22 21:04:22 -0800 | [diff] [blame] | 3 | |
| 4 | flatbuffer_cc_library( |
| 5 | name = "vision_fbs", |
| 6 | srcs = ["vision.fbs"], |
| 7 | gen_reflections = 1, |
| 8 | target_compatible_with = ["@platforms//os:linux"], |
| 9 | visibility = ["//visibility:public"], |
| 10 | ) |
| 11 | |
| 12 | flatbuffer_ts_library( |
| 13 | name = "vision_ts_fbs", |
| 14 | srcs = ["vision.fbs"], |
| 15 | target_compatible_with = ["@platforms//os:linux"], |
| 16 | visibility = ["//visibility:public"], |
| 17 | ) |
| 18 | |
milind-u | 2f101fc | 2023-01-21 12:28:49 -0800 | [diff] [blame^] | 19 | flatbuffer_cc_library( |
| 20 | name = "calibration_fbs", |
| 21 | srcs = ["calibration.fbs"], |
| 22 | gen_reflections = 1, |
| 23 | target_compatible_with = ["@platforms//os:linux"], |
| 24 | visibility = ["//visibility:public"], |
| 25 | ) |
| 26 | |
| 27 | flatbuffer_ts_library( |
| 28 | name = "calibration_ts_fbs", |
| 29 | srcs = ["calibration.fbs"], |
| 30 | target_compatible_with = ["@platforms//os:linux"], |
| 31 | visibility = ["//visibility:public"], |
| 32 | ) |
| 33 | |
| 34 | flatbuffer_py_library( |
| 35 | name = "calibration_fbs_python", |
| 36 | srcs = [ |
| 37 | "calibration.fbs", |
| 38 | ], |
| 39 | namespace = "frc971.vision.calibration", |
| 40 | tables = [ |
| 41 | "CalibrationData", |
| 42 | "CameraCalibration", |
| 43 | "TransformationMatrix", |
| 44 | ], |
| 45 | target_compatible_with = ["@platforms//os:linux"], |
| 46 | visibility = ["//visibility:public"], |
| 47 | ) |
| 48 | |
Jim Ostrowski | 977850f | 2022-01-22 21:04:22 -0800 | [diff] [blame] | 49 | cc_library( |
| 50 | name = "v4l2_reader", |
| 51 | srcs = [ |
| 52 | "v4l2_reader.cc", |
| 53 | ], |
| 54 | hdrs = [ |
| 55 | "v4l2_reader.h", |
| 56 | ], |
| 57 | target_compatible_with = ["@platforms//os:linux"], |
| 58 | visibility = ["//visibility:public"], |
| 59 | deps = [ |
| 60 | ":vision_fbs", |
Ravago Jones | dc52475 | 2022-12-27 01:15:13 -0800 | [diff] [blame] | 61 | "//aos/events:epoll", |
Jim Ostrowski | 977850f | 2022-01-22 21:04:22 -0800 | [diff] [blame] | 62 | "//aos/events:event_loop", |
| 63 | "//aos/scoped:scoped_fd", |
| 64 | "@com_github_google_glog//:glog", |
| 65 | "@com_google_absl//absl/base", |
| 66 | ], |
| 67 | ) |
Austin Schuh | dcb6b36 | 2022-02-25 18:06:21 -0800 | [diff] [blame] | 68 | |
| 69 | cc_library( |
| 70 | name = "charuco_lib", |
| 71 | srcs = [ |
| 72 | "charuco_lib.cc", |
| 73 | ], |
| 74 | hdrs = [ |
| 75 | "charuco_lib.h", |
| 76 | ], |
| 77 | target_compatible_with = ["@platforms//os:linux"], |
| 78 | visibility = ["//visibility:public"], |
| 79 | deps = [ |
| 80 | "//aos:flatbuffers", |
| 81 | "//aos/events:event_loop", |
| 82 | "//aos/network:message_bridge_server_fbs", |
| 83 | "//aos/network:team_number", |
| 84 | "//frc971/control_loops:quaternion_utils", |
| 85 | "//frc971/vision:vision_fbs", |
| 86 | "//third_party:opencv", |
| 87 | "//y2020/vision/sift:sift_fbs", |
| 88 | "//y2020/vision/sift:sift_training_fbs", |
| 89 | "//y2020/vision/tools/python_code:sift_training_data", |
| 90 | "@com_github_google_glog//:glog", |
| 91 | "@com_google_absl//absl/strings:str_format", |
| 92 | "@com_google_absl//absl/types:span", |
| 93 | "@org_tuxfamily_eigen//:eigen", |
| 94 | ], |
| 95 | ) |
| 96 | |
| 97 | cc_library( |
| 98 | name = "extrinsics_calibration", |
| 99 | srcs = [ |
| 100 | "calibration_accumulator.cc", |
| 101 | "calibration_accumulator.h", |
| 102 | "extrinsics_calibration.cc", |
| 103 | "extrinsics_calibration.h", |
| 104 | ], |
| 105 | target_compatible_with = ["@platforms//os:linux"], |
| 106 | visibility = ["//visibility:public"], |
| 107 | deps = [ |
| 108 | ":charuco_lib", |
| 109 | "//aos:init", |
| 110 | "//aos/events/logging:log_reader", |
| 111 | "//frc971/analysis:in_process_plotter", |
| 112 | "//frc971/control_loops/drivetrain:improved_down_estimator", |
Jim Ostrowski | ba2edd1 | 2022-12-03 15:44:37 -0800 | [diff] [blame] | 113 | "//frc971/vision:visualize_robot", |
Austin Schuh | dcb6b36 | 2022-02-25 18:06:21 -0800 | [diff] [blame] | 114 | "//frc971/wpilib:imu_batch_fbs", |
| 115 | "//frc971/wpilib:imu_fbs", |
| 116 | "//third_party:opencv", |
| 117 | "@com_google_absl//absl/strings:str_format", |
| 118 | "@com_google_ceres_solver//:ceres", |
| 119 | "@org_tuxfamily_eigen//:eigen", |
| 120 | ], |
| 121 | ) |
Milind Upadhyay | b67c618 | 2022-10-22 13:45:45 -0700 | [diff] [blame] | 122 | |
Milind Upadhyay | cd677a3 | 2022-12-04 13:06:43 -0800 | [diff] [blame] | 123 | flatbuffer_cc_library( |
| 124 | name = "target_map_fbs", |
| 125 | srcs = ["target_map.fbs"], |
| 126 | gen_reflections = 1, |
| 127 | target_compatible_with = ["@platforms//os:linux"], |
| 128 | visibility = ["//visibility:public"], |
| 129 | ) |
| 130 | |
Milind Upadhyay | b67c618 | 2022-10-22 13:45:45 -0700 | [diff] [blame] | 131 | cc_library( |
Milind Upadhyay | 7c20522 | 2022-11-16 18:20:58 -0800 | [diff] [blame] | 132 | name = "target_mapper", |
| 133 | srcs = ["target_mapper.cc"], |
| 134 | hdrs = ["target_mapper.h"], |
Yash Chainani | d5c7f0d | 2022-11-19 17:05:57 -0800 | [diff] [blame] | 135 | data = ["target_map.json"], |
Milind Upadhyay | 7c20522 | 2022-11-16 18:20:58 -0800 | [diff] [blame] | 136 | target_compatible_with = ["@platforms//os:linux"], |
| 137 | visibility = ["//visibility:public"], |
| 138 | deps = [ |
| 139 | ":geometry_lib", |
Milind Upadhyay | cd677a3 | 2022-12-04 13:06:43 -0800 | [diff] [blame] | 140 | ":target_map_fbs", |
Milind Upadhyay | 7c20522 | 2022-11-16 18:20:58 -0800 | [diff] [blame] | 141 | "//aos/events:simulated_event_loop", |
| 142 | "//frc971/control_loops:control_loop", |
| 143 | "//frc971/vision/ceres:pose_graph_2d_lib", |
| 144 | "//third_party:opencv", |
| 145 | "@com_google_ceres_solver//:ceres", |
| 146 | "@org_tuxfamily_eigen//:eigen", |
| 147 | ], |
| 148 | ) |
| 149 | |
| 150 | cc_test( |
| 151 | name = "target_mapper_test", |
| 152 | srcs = [ |
| 153 | "target_mapper_test.cc", |
| 154 | ], |
| 155 | target_compatible_with = ["@platforms//os:linux"], |
| 156 | deps = [ |
| 157 | ":target_mapper", |
| 158 | "//aos/events:simulated_event_loop", |
| 159 | "//aos/testing:googletest", |
| 160 | "//aos/testing:random_seed", |
| 161 | ], |
| 162 | ) |
| 163 | |
| 164 | cc_library( |
Milind Upadhyay | b67c618 | 2022-10-22 13:45:45 -0700 | [diff] [blame] | 165 | name = "geometry_lib", |
| 166 | hdrs = [ |
| 167 | "geometry.h", |
| 168 | ], |
| 169 | target_compatible_with = ["@platforms//os:linux"], |
| 170 | visibility = ["//visibility:public"], |
| 171 | deps = [ |
| 172 | "//aos/util:math", |
| 173 | "//third_party:opencv", |
| 174 | "@com_github_google_glog//:glog", |
| 175 | ], |
| 176 | ) |
| 177 | |
| 178 | cc_test( |
| 179 | name = "geometry_test", |
| 180 | srcs = [ |
| 181 | "geometry_test.cc", |
| 182 | ], |
| 183 | deps = [ |
| 184 | ":geometry_lib", |
| 185 | "//aos/testing:googletest", |
| 186 | ], |
| 187 | ) |
Jim Ostrowski | ba2edd1 | 2022-12-03 15:44:37 -0800 | [diff] [blame] | 188 | |
| 189 | cc_library( |
| 190 | name = "visualize_robot", |
| 191 | srcs = [ |
| 192 | "visualize_robot.cc", |
| 193 | ], |
| 194 | hdrs = [ |
| 195 | "visualize_robot.h", |
| 196 | ], |
| 197 | deps = [ |
| 198 | "//aos:init", |
| 199 | "//third_party:opencv", |
| 200 | "@com_google_absl//absl/strings:str_format", |
| 201 | "@org_tuxfamily_eigen//:eigen", |
| 202 | ], |
| 203 | ) |
| 204 | |
| 205 | cc_binary( |
| 206 | name = "visualize_robot_sample", |
| 207 | srcs = [ |
| 208 | "visualize_robot_sample.cc", |
| 209 | ], |
| 210 | target_compatible_with = ["@platforms//os:linux"], |
| 211 | visibility = ["//visibility:public"], |
| 212 | deps = [ |
| 213 | "//aos:init", |
| 214 | "//frc971/vision:visualize_robot", |
| 215 | "//third_party:opencv", |
| 216 | "@com_github_google_glog//:glog", |
| 217 | "@com_google_ceres_solver//:ceres", |
| 218 | "@org_tuxfamily_eigen//:eigen", |
| 219 | ], |
| 220 | ) |
Austin Schuh | c97d48d | 2022-12-26 14:09:13 -0800 | [diff] [blame] | 221 | |
| 222 | cc_library( |
| 223 | name = "media_device", |
| 224 | srcs = [ |
| 225 | "media_device.cc", |
| 226 | ], |
| 227 | hdrs = ["media_device.h"], |
| 228 | visibility = ["//visibility:public"], |
| 229 | deps = [ |
| 230 | "//aos/scoped:scoped_fd", |
| 231 | "//aos/util:file", |
| 232 | "@com_github_google_glog//:glog", |
| 233 | "@com_google_absl//absl/strings", |
| 234 | ], |
| 235 | ) |