tree: 500c3a2de850a9a9625c77b215877e3959122e00 [path history] [tgz]
  1. calib_files/
  2. maps/
  3. april_detection_test.cc
  4. april_generator.cc
  5. aprilrobotics.cc
  6. aprilrobotics.h
  7. aprilrobotics_main.cc
  8. BUILD
  9. calibrate_extrinsics.cc
  10. calibrate_multi_cameras.cc
  11. calibrate_multi_cameras_test.py
  12. camera_monitor.cc
  13. camera_monitor_lib.cc
  14. camera_monitor_lib.h
  15. camera_reader.cc
  16. ccm.cc
  17. foxglove_image_converter.cc
  18. game_pieces.cc
  19. game_pieces.fbs
  20. game_pieces.h
  21. game_pieces_detector_starter.sh
  22. game_pieces_main.cc
  23. image_logger.cc
  24. image_streamer_start.sh
  25. localization_verifier.cc
  26. README.md
  27. rkisp1-config.h
  28. target_mapping.cc
  29. viewer.cc
  30. vision_util.cc
  31. vision_util.h
  32. yolov5.cc
  33. 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