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 | |
| 91 | cc_library( |
Milind Upadhyay | 7c20522 | 2022-11-16 18:20:58 -0800 | [diff] [blame] | 92 | name = "target_mapper", |
| 93 | srcs = ["target_mapper.cc"], |
| 94 | hdrs = ["target_mapper.h"], |
| 95 | target_compatible_with = ["@platforms//os:linux"], |
| 96 | visibility = ["//visibility:public"], |
| 97 | deps = [ |
| 98 | ":geometry_lib", |
| 99 | "//aos/events:simulated_event_loop", |
| 100 | "//frc971/control_loops:control_loop", |
| 101 | "//frc971/vision/ceres:pose_graph_2d_lib", |
| 102 | "//third_party:opencv", |
| 103 | "@com_google_ceres_solver//:ceres", |
| 104 | "@org_tuxfamily_eigen//:eigen", |
| 105 | ], |
| 106 | ) |
| 107 | |
| 108 | cc_test( |
| 109 | name = "target_mapper_test", |
| 110 | srcs = [ |
| 111 | "target_mapper_test.cc", |
| 112 | ], |
| 113 | target_compatible_with = ["@platforms//os:linux"], |
| 114 | deps = [ |
| 115 | ":target_mapper", |
| 116 | "//aos/events:simulated_event_loop", |
| 117 | "//aos/testing:googletest", |
| 118 | "//aos/testing:random_seed", |
| 119 | ], |
| 120 | ) |
| 121 | |
| 122 | cc_library( |
Milind Upadhyay | b67c618 | 2022-10-22 13:45:45 -0700 | [diff] [blame] | 123 | name = "geometry_lib", |
| 124 | hdrs = [ |
| 125 | "geometry.h", |
| 126 | ], |
| 127 | target_compatible_with = ["@platforms//os:linux"], |
| 128 | visibility = ["//visibility:public"], |
| 129 | deps = [ |
| 130 | "//aos/util:math", |
| 131 | "//third_party:opencv", |
| 132 | "@com_github_google_glog//:glog", |
| 133 | ], |
| 134 | ) |
| 135 | |
| 136 | cc_test( |
| 137 | name = "geometry_test", |
| 138 | srcs = [ |
| 139 | "geometry_test.cc", |
| 140 | ], |
| 141 | deps = [ |
| 142 | ":geometry_lib", |
| 143 | "//aos/testing:googletest", |
| 144 | ], |
| 145 | ) |