Adding multi-camera extrinsic calibration between cameras
Uses pair of Aruco Diamonds to build extrinsics between neighboring cameras
Small refactor of charuco_lib to allow construction without requiring event_loop
Change max_pose_error to 1e-7 based on data from SFR match
Also loosen decision_margin to 50 based on the same data
Small cleanup/typos in target_mapping
Change-Id: If3b902612cb99e4f6e8a20291561fac766e6bacc
Signed-off-by: Jim Ostrowski <yimmy13@gmail.com>
diff --git a/y2023/vision/BUILD b/y2023/vision/BUILD
index d5168c1..ef300e3 100644
--- a/y2023/vision/BUILD
+++ b/y2023/vision/BUILD
@@ -83,10 +83,10 @@
"//frc971/vision:calibration_fbs",
"//frc971/vision:charuco_lib",
"//frc971/vision:target_mapper",
+ "//frc971/vision:visualize_robot",
"//third_party:opencv",
"//y2023/constants:constants_fbs",
"//y2023/constants:simulated_constants_sender",
- "@org_tuxfamily_eigen//:eigen",
],
)
@@ -203,6 +203,36 @@
)
cc_binary(
+ name = "calibrate_multi_cameras",
+ srcs = [
+ "calibrate_multi_cameras.cc",
+ ],
+ data = [
+ "//y2023:aos_config",
+ "//y2023/constants:constants.json",
+ "//y2023/vision:maps",
+ ],
+ target_compatible_with = ["@platforms//os:linux"],
+ visibility = ["//y2023:__subpackages__"],
+ deps = [
+ ":aprilrobotics_lib",
+ "//aos:init",
+ "//aos/events:simulated_event_loop",
+ "//aos/events/logging:log_reader",
+ "//aos/util:mcap_logger",
+ "//frc971/constants:constants_sender_lib",
+ "//frc971/control_loops:pose",
+ "//frc971/vision:calibration_fbs",
+ "//frc971/vision:charuco_lib",
+ "//frc971/vision:target_mapper",
+ "//third_party:opencv",
+ "//y2023/constants:constants_fbs",
+ "//y2023/constants:simulated_constants_sender",
+ "@org_tuxfamily_eigen//:eigen",
+ ],
+)
+
+cc_binary(
name = "game_pieces_detector",
srcs = [
"game_pieces_main.cc",