tree: 5e617223b4e1cba8eae16c4b6819069610280e4a [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. camera_monitor.cc
  12. camera_monitor_lib.cc
  13. camera_monitor_lib.h
  14. camera_reader.cc
  15. foxglove_image_converter.cc
  16. game_pieces.cc
  17. game_pieces.fbs
  18. game_pieces.h
  19. game_pieces_detector_starter.sh
  20. game_pieces_main.cc
  21. image_logger.cc
  22. image_streamer_start.sh
  23. localization_verifier.cc
  24. README.md
  25. rkisp1-config.h
  26. target_mapping.cc
  27. viewer.cc
  28. vision_util.cc
  29. vision_util.h
  30. yolov5.cc
  31. 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