ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25k stars 9.67k forks source link

How to do Extrinsic camera to camera calibration #4241

Closed raghu31081987 closed 6 years ago

raghu31081987 commented 6 years ago

Hi, I have two stereo zed camera and i am using usb_cam roslaunch application to launch left and right sensor of a stereo camera. to do extrinsic camera calibration using "scripts/sensor_calibration.sh camera_camera" how this step works? how to pass topics name of each camera and get the yaml file. my topics names are: /sideLeft/left/image_raw, /sideLeft/right/image_raw, /frontNear/left/image_raw, /frontNear/right/image_raw i am trying this calib at lab setup.

techoe commented 6 years ago

Hi, We use a lidar to calibrate cameras. If you do not have a lidar, you need the to measure translation (x, y, z) of a camera from IMU manually or using a vehicle model. For rotation, please align a camera to have ypr =[0, 0, 0] degrees. When aligned well the center of image should be a vanishing point and the central horizontal line should be aligned with a horizon. Thank you, Tae Eun

snehagn commented 6 years ago

Hi,

I am trying to use the camera_camera calibrator node as well and have been unsuccessful in getting it to generate the output .yaml file. Has this issue been addressed/resolved? If not, what is the best way to do the extrinsic calibration for an Apollo setup without using sensor_calibration.sh?

Thanks, Sneha

raghu31081987 commented 6 years ago

No It was not resolved to me... I am trying to figure it out how apollo calibration works... did you find any source code of apollo calibration tool (camera_camera or camera_lidar) on github because i get those as binary tar file.

snehagn commented 6 years ago

No I do not have access to the source code either, it is an executable.

snehagn commented 6 years ago

Hi @techoe

I am able to run sensor_calibration.sh, but I get an INS_STAT not 56 (current is at -1) error. The issue is that ins_stat is publishing 56 and verifying it outside Apollo also shows INS_GOOD (which is ins_stat 56). Can you help out with this issue?

Thanks, Sneha

raghu31081987 commented 6 years ago

Hi Sneha,

I have stoped using apollo auto for camera camera or any sensor extrinsic calibration. I am trying out to do my own calibration using openCV aruco. try it out it might help you too. its a simple approach. I am able to get camera to camera extrinsic calibration with other sensors.

Thanks, Raghu

techoe commented 6 years ago

Thank you Raghu! Using openCV or your own target with known position is also one way. Apollo team will provide better solution later.

snehagn commented 6 years ago

@raghu31081987 and @techoe Thank you, guys.

snehagn commented 6 years ago

Hi @raghu31081987 - does this work with mono cameras? Or only Stereo (as far as I have noticed)

raghu31081987 commented 6 years ago

Hi Sneha, It works for mono as well as stereo camera too... for stereo take any one sensor either left or right as center and find rotation and translation to other stereo left or right sensor. as Aruco marker will give you the distance of camera to marker. but there is some mathamatics need after you get result from Aruco.

raghu31081987 commented 6 years ago

You need to do stereo intrinsics calibration before this which might help you to get better accuracy.

snehagn commented 6 years ago

The solution for the Apollo calibration tools issue was to set the uvcvideo clock to real time for the cameras (thank you @YangHan101 and @techoe).