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", |
| 31 | "//aos/events:event_loop", |
| 32 | "//aos/scoped:scoped_fd", |
| 33 | "@com_github_google_glog//:glog", |
| 34 | "@com_google_absl//absl/base", |
| 35 | ], |
| 36 | ) |
Austin Schuh | dcb6b36 | 2022-02-25 18:06:21 -0800 | [diff] [blame] | 37 | |
| 38 | cc_library( |
| 39 | name = "charuco_lib", |
| 40 | srcs = [ |
| 41 | "charuco_lib.cc", |
| 42 | ], |
| 43 | hdrs = [ |
| 44 | "charuco_lib.h", |
| 45 | ], |
| 46 | target_compatible_with = ["@platforms//os:linux"], |
| 47 | visibility = ["//visibility:public"], |
| 48 | deps = [ |
| 49 | "//aos:flatbuffers", |
| 50 | "//aos/events:event_loop", |
| 51 | "//aos/network:message_bridge_server_fbs", |
| 52 | "//aos/network:team_number", |
| 53 | "//frc971/control_loops:quaternion_utils", |
| 54 | "//frc971/vision:vision_fbs", |
| 55 | "//third_party:opencv", |
| 56 | "//y2020/vision/sift:sift_fbs", |
| 57 | "//y2020/vision/sift:sift_training_fbs", |
| 58 | "//y2020/vision/tools/python_code:sift_training_data", |
| 59 | "@com_github_google_glog//:glog", |
| 60 | "@com_google_absl//absl/strings:str_format", |
| 61 | "@com_google_absl//absl/types:span", |
| 62 | "@org_tuxfamily_eigen//:eigen", |
| 63 | ], |
| 64 | ) |
| 65 | |
| 66 | cc_library( |
| 67 | name = "extrinsics_calibration", |
| 68 | srcs = [ |
| 69 | "calibration_accumulator.cc", |
| 70 | "calibration_accumulator.h", |
| 71 | "extrinsics_calibration.cc", |
| 72 | "extrinsics_calibration.h", |
| 73 | ], |
| 74 | target_compatible_with = ["@platforms//os:linux"], |
| 75 | visibility = ["//visibility:public"], |
| 76 | deps = [ |
| 77 | ":charuco_lib", |
| 78 | "//aos:init", |
| 79 | "//aos/events/logging:log_reader", |
| 80 | "//frc971/analysis:in_process_plotter", |
| 81 | "//frc971/control_loops/drivetrain:improved_down_estimator", |
| 82 | "//frc971/wpilib:imu_batch_fbs", |
| 83 | "//frc971/wpilib:imu_fbs", |
| 84 | "//third_party:opencv", |
| 85 | "@com_google_absl//absl/strings:str_format", |
| 86 | "@com_google_ceres_solver//:ceres", |
| 87 | "@org_tuxfamily_eigen//:eigen", |
| 88 | ], |
| 89 | ) |
Milind Upadhyay | b67c618 | 2022-10-22 13:45:45 -0700 | [diff] [blame] | 90 | |
Milind Upadhyay | cd677a3 | 2022-12-04 13:06:43 -0800 | [diff] [blame^] | 91 | flatbuffer_cc_library( |
| 92 | name = "target_map_fbs", |
| 93 | srcs = ["target_map.fbs"], |
| 94 | gen_reflections = 1, |
| 95 | target_compatible_with = ["@platforms//os:linux"], |
| 96 | visibility = ["//visibility:public"], |
| 97 | ) |
| 98 | |
Milind Upadhyay | b67c618 | 2022-10-22 13:45:45 -0700 | [diff] [blame] | 99 | cc_library( |
Milind Upadhyay | 7c20522 | 2022-11-16 18:20:58 -0800 | [diff] [blame] | 100 | name = "target_mapper", |
| 101 | srcs = ["target_mapper.cc"], |
| 102 | hdrs = ["target_mapper.h"], |
| 103 | target_compatible_with = ["@platforms//os:linux"], |
| 104 | visibility = ["//visibility:public"], |
| 105 | deps = [ |
| 106 | ":geometry_lib", |
Milind Upadhyay | cd677a3 | 2022-12-04 13:06:43 -0800 | [diff] [blame^] | 107 | ":target_map_fbs", |
Milind Upadhyay | 7c20522 | 2022-11-16 18:20:58 -0800 | [diff] [blame] | 108 | "//aos/events:simulated_event_loop", |
| 109 | "//frc971/control_loops:control_loop", |
| 110 | "//frc971/vision/ceres:pose_graph_2d_lib", |
| 111 | "//third_party:opencv", |
| 112 | "@com_google_ceres_solver//:ceres", |
| 113 | "@org_tuxfamily_eigen//:eigen", |
| 114 | ], |
| 115 | ) |
| 116 | |
| 117 | cc_test( |
| 118 | name = "target_mapper_test", |
| 119 | srcs = [ |
| 120 | "target_mapper_test.cc", |
| 121 | ], |
| 122 | target_compatible_with = ["@platforms//os:linux"], |
| 123 | deps = [ |
| 124 | ":target_mapper", |
| 125 | "//aos/events:simulated_event_loop", |
| 126 | "//aos/testing:googletest", |
| 127 | "//aos/testing:random_seed", |
| 128 | ], |
| 129 | ) |
| 130 | |
| 131 | cc_library( |
Milind Upadhyay | b67c618 | 2022-10-22 13:45:45 -0700 | [diff] [blame] | 132 | name = "geometry_lib", |
| 133 | hdrs = [ |
| 134 | "geometry.h", |
| 135 | ], |
| 136 | target_compatible_with = ["@platforms//os:linux"], |
| 137 | visibility = ["//visibility:public"], |
| 138 | deps = [ |
| 139 | "//aos/util:math", |
| 140 | "//third_party:opencv", |
| 141 | "@com_github_google_glog//:glog", |
| 142 | ], |
| 143 | ) |
| 144 | |
| 145 | cc_test( |
| 146 | name = "geometry_test", |
| 147 | srcs = [ |
| 148 | "geometry_test.cc", |
| 149 | ], |
| 150 | deps = [ |
| 151 | ":geometry_lib", |
| 152 | "//aos/testing:googletest", |
| 153 | ], |
| 154 | ) |