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