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