ethz-asl / kalibr

The Kalibr visual-inertial calibration toolbox
Other
4.43k stars 1.4k forks source link

calibration of non synchronized cameras #633

Closed lsorgi closed 1 year ago

lsorgi commented 1 year ago

Hello!

I am having issues calibrating a system with 2 non-synchronized cameras with divergent optical axis, i.e. with only ~30% of the field of view overlap.

If I run the intrinsic calibration of both cameras independently it works correctly, undistorsion look good, metrics good, all good. Commands for intrinsic calibration is

rosrun kalibr kalibr_calibrate_cameras  --bag <KALIBR_BAGFILE>  --topics /cam0/image_raw  --models pinhole-equi  --target <TARGET_YAML>
rosrun kalibr kalibr_calibrate_cameras  --bag <KALIBR_BAGFILE>  --topics /cam1/image_raw  --models pinhole-equi  --target <TARGET_YAML>

If I run the calibration of both cameras simultaneously it fails, not being able to correctly initialize the stereo pairs.
The command for stereo calibration is

rosrun kalibr kalibr_calibrate_cameras  --bag <KALIBR_BAGFILE>  --topics /cam0/image_raw  /cam1/image_raw  --models pinhole-equi pinhole-equi  --target <TARGET_YAML>

I naively assumed that the temporal offset between the cameras was handled by the tool... is it not the case? do the 2 camera stream need to be strictly synchronized?

kololhe commented 1 year ago

I faced a similar issue. What you can do instead is provide a measure of the asynchronization. AFAIK, Kalibr does do approximate synchronization if the topics are not synchronized.

You can pass the tolerance for approximate synchronization: --approx-sync MAX_DELTA_APPROXSYNC Time tolerance for approximate image synchronization [s] (default: 0.02)

To identify the time difference, you can use rostopic delay which will give you delays between sequential ROS messages for a topic (NOT between multiple topics)

You can also increase the number of iterations, or include more images of your target in the overlap of the two cameras.

lsorgi commented 1 year ago

thx!

sun421-cloud commented 3 months ago

thx!

Hello, have you successfully calibrated the unsynchronized stereo camera with the above method? Or hardware alignment was eventually adopted? Looking at your camera model, do you use a fisheye camera?

lsorgi commented 3 months ago

Hi! I use fisheye camera models and we eventually synchronized the cameras

Sent from my iPhone

On 1 Aug 2024, at 17:15, sun421-cloud @.***> wrote:

 thx!

Hello, have you successfully calibrated the unsynchronized stereo camera with the above method? Or hardware alignment was eventually adopted? Looking at your camera model, do you use a fisheye camera?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you modified the open/close state.