hengli / camodocal

CamOdoCal: Automatic Intrinsic and Extrinsic Calibration of a Rig with Multiple Generic Cameras and Odometry

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IMU and GPS data required for running CamOdoCal?

stillbreeze opened this issue · comments

Hi,

I'm trying to run the project and have executed the intrinsic and extrinsic binaries and gotten their outputs.

For running the extrinsic_calib binary, do I necessarily need IMU and/or GPS data? Currently, I run with only stereo data (only 3 pairs for testing) and get this output:

Get images and pose files out from result directory
image name : ../data/extrinsic_data/camera_0_2.png time : 2image name : ../data/extrinsic_data/camera_1_0.png time : 0image name : ../data/extrinsic_data/camera_0_1.png time : 1image name : ../data/extrinsic_data/camera_1_2.png time : 2image name : ../data/extrinsic_data/camera_1_1.png time : 1image name : ../data/extrinsic_data/camera_0_0.png time : 0# INFO: Initialization finished!
init done
opengl support available
# INFO: Running camera-odometry calibration for each of the 2 cameras.
# ERROR: No segments, calibration fails!!# ERROR: No segments, calibration fails!!
# INFO: Calibrating odometry - camera 1...
Rotation: 

6.94267e-310 6.94258e-310 6.94267e-310
6.94267e-310 6.94258e-310 7.90505e-323
6.94258e-310 6.94258e-310 6.94258e-310
Translation: 
2.52962e-321            0 6.94267e-310
# INFO: Calibrating odometry - camera 0...
Rotation: 
6.94267e-310 6.94258e-310 6.94267e-310
6.94267e-310 6.94258e-310 7.90505e-323
6.94258e-310 6.94258e-310 6.94258e-310
Translation: 
2.52962e-321            0 6.94267e-310

Any help would be highly appreciated. Thanks in advance!

Actually it needs either
1.) GPS & IMU data, where the IMU data must be in the local geographic frame. (I think it is east north up, and the angle around the up-axis is counterclockwise, and NOT the compass directions.)
or
2.) x, y and yaw.

Using case 1.) you need an event file, using case 2.) you need for each set of images a txt file containing x, y, and yaw.

@stillbreeze Did you solve the problem? I got the same problem. if possible, could you explain your solutions to me?

@MohrMa2
One clarification. When we do not use an event file, in the code the text file is having rotation and translation matrices as per the example code

Eigen::Vector3f t;
Eigen::Matrix3f R;
std::ifstream file(it->path().c_str());
std::cout << "pose path : " << it->path().c_str() << std::endl;
if (!file.is_open())
{
printf("cannot find file %s containg a valid pose\n", it->path().c_str());
return 1;
}
file >> R(0,0) >> R(0, 1) >> R(0, 2);
file >> R(1,0) >> R(1, 1) >> R(1, 2);
file >> R(2,0) >> R(2, 1) >> R(2, 2);
file >> t[0] >> t[1] >> t[2];
file.close();
Eigen::Isometry3f T;
T.matrix().block<3,3>(0,0) = R;
T.matrix().block<3,1>(0,3) = t;
inputOdometry[timestamp] = T;

Do you have a working example of a pose file and the event file? I just need it to convert my data to this format.

I only used an event file (if I remember correctly).
It looks like this:

1264963 CAM 0 GH010038_Frame_37912.JPG
1264963 CAM 1 GH010131_Frame_37912.JPG
1264963 CAM 2 GH013552_Frame_37912.JPG
1264963 CAM 3 GH016853_Frame_37912.JPG
1264963 CAM 4 GH010034_Frame_37912.JPG
1264963 CAM 5 GH010064_Frame_37912.JPG
1264966 IMU 0.9409967488097613 -0.10078563645397824 -0.02480492844525846 0.32210571205560934
1264971 IMU 0.9413148371662313 -0.09738375442102762 -0.026632561837073316 0.3220768361052543
1264976 IMU 0.9409471120865325 -0.10063867874615712 -0.028543709292637786 0.3219870265337713
1264981 IMU 0.9412895987522149 -0.09688725665202104 -0.028104712424889235 0.3221752254889473
1264986 IMU 0.9410579278259364 -0.09850801366547605 -0.024639628854419813 0.3226438228287553
1264991 IMU 0.9406350182876361 -0.1022503275025428 -0.025236301427799274 0.32266664219730956
1264996 IMU 0.9406930038866845 -0.10159924296458428 -0.029065036324521665 0.3223809701752317
1264997 CAM 0 GH010038_Frame_37913.JPG
1264997 CAM 1 GH010131_Frame_37913.JPG
1264997 CAM 2 GH013552_Frame_37913.JPG
1264997 CAM 3 GH016853_Frame_37913.JPG
1264997 CAM 4 GH010034_Frame_37913.JPG
1264997 CAM 5 GH010064_Frame_37913.JPG
1265001 GPS 52.4528301 13.4211386 0
<<<

However, I never got converged results with it.

@MohrMa2 Thanks
Did you undertand the format of x,y and yaw required. Is it relative to the first frame or is it relative to the previous frame or any other format?