tree: 9137cdb074c33a619984bcc5503976ab12a9c1e0 [path history] [tgz]
  1. calib_files/
  2. maps/
  3. april_detection_test.cc
  4. aprilrobotics.cc
  5. aprilrobotics.h
  6. aprilrobotics_main.cc
  7. BUILD
  8. calibrate_extrinsics.cc
  9. calibrate_multi_cameras.cc
  10. camera_monitor.cc
  11. camera_monitor_lib.cc
  12. camera_monitor_lib.h
  13. camera_reader.cc
  14. foxglove_image_converter.cc
  15. game_pieces.cc
  16. game_pieces.fbs
  17. game_pieces.h
  18. game_pieces_detector_starter.sh
  19. game_pieces_main.cc
  20. image_logger.cc
  21. image_streamer_start.sh
  22. localization_verifier.cc
  23. README.md
  24. rkisp1-config.h
  25. target_mapping.cc
  26. viewer.cc
  27. vision_util.cc
  28. vision_util.h
  29. yolov5.cc
  30. yolov5.h
y2023/vision/README.md

How to use the extrinsic calibration for camera-to-camera calibration

This all assumes you have cameras that have been intrinsically calibrated, and that pi1 has a valid extrinsic calibration (from robot origin / IMU to the pi1 camera).

It by default will compute the extrinsics for each of the other cameras (pi2, pi3, pi4) relative to the robot origin (IMU origin).

Steps:

  • Place two Aruco Diamond markers about 1 meter apart (center-to-center) at a height so that they will be in view of the cameras when the robot is about 1-2m away
  • Start with the robot in a position that both markers are fully in view by one camera
  • Enable logging for all cameras
  • Rotate the robot in place through a full circle, so that each camera sees both tags, and at times just one tag.
  • Stop the logging and copy the files to your laptop
  • Run the calibration code on the resulting files, e.g.,
    • `bazel run -c opt //y2023/vision:calibrate_multi_cameras -- /data/PATH_TO_LOGS --team_number 971 --target_type charuco_diamond
    • Can add "--visualize" flag to see the camera views and marker detections
    • I've sometimes found it necessary to add the "--skip_missing_forwarding_entries" flag-- as guided by the logging messages
  • From the output, copy the calculated ("Updated") extrinsic into the corresponding calibration file for the right robot and camera in the calib_files directory