New dataset with AprilGrid,more rotation. Still no succes.
Log:
$ rosrun kalibr kalibr_calibrate_imu_camera --time-calibration --bag bags/2014-09-11_calibration_MTi_Logitech.bag --cam repos/kalibr/config/camera/logitech.yaml --imu repos/kalibr/config/imu/MTx.yaml --target repos/kalibr/config/calibration_target/aprilgrid.yaml
importing libraries
Initializing IMUs:
Update rate: 100
Accelerometer:
Noise density: 0.004
Noise density (discrete): 0.04
Random walk: 0.02
Gyroscope:
Noise density: 0.1
Noise density (discrete): 1.0
Random walk: 1.0
Initializing imu rosbag dataset reader:
Dataset: bags/2014-09-11_calibration_MTi_Logitech.bag
Topic: /MTi/imu/data
Number of messages: 9928
Reading IMU data (/MTi/imu/data)
Read 9928 imu readings over 99.3 seconds
Initializing calibration target:
Type: aprilgrid
Tags:
Rows: 6
Cols: 6
Size: 0.024 [m]
Spacing 0.00700008 [m]
Initializing camera chain:
Camera chain - cam0:
Camera model: pinhole
Focal length: [552.357544, 319.346027]
Principal point: [553.012817, 242.821647]
Distortion model: radtan
Distortion coefficients: [-0.010014, -0.046626, 0.001439, -0.010307]
baseline: no data available
Initializing camera rosbag dataset reader:
Dataset: bags/2014-09-11_calibration_MTi_Logitech.bag
Topic: /logitech_camera/image_mono
Number of images: 993
Extracting calibration target corners
Extracted corners for 950 images (of 993 images)
Building the problem
Spline order: 6
Pose knots per second: 70
Do pose motion regularization: False
xddot translation variance: 1000000.000000
xddot rotation variance: 100000.000000
Bias knots per second: 50
Do bias motion regularization: True
Blake-Zisserman on reprojection errors -1
Acceleration Huber width (m/s^2): -1.000000
Gyroscope Huber width (rad/s): -1.000000
Do time calibration: True
Max iterations: 30
Time offset padding: 0.020000
Estimating time shift camera to imu:
Initializing a pose spline with 9920 knots (100.000000 knots per second over 99.202755 seconds)
Time shift camera to imu (t_imu = t_cam + shift):
0.0199985681397
Estimating imu-camera rotation prior
Initializing a pose spline with 9920 knots (100.000000 knots per second over 99.202755 seconds)
Orientation prior camera-imu found as: (T_i_c)
[[ 0.17627035 -0.97390705 0.14294694]
[ 0.35324839 -0.07296031 -0.93268021]
[ 0.91877328 0.21489964 0.33117035]]
Gyro bias prior found as: (b_gyro)
[-0.00785384 0.00116788 0.04543723]
Initializing a pose spline with 9928 knots (100.000000 knots per second over 99.282755 seconds)
Initializing the bias splines with 4964 knots
Adding camera error terms (/logitech_camera/image_mono)
Added 950 camera error terms
Adding accelerometer error terms (/MTi/imu/data)
Progress 4425 / 9928 Time remaining: 3m 5s
Added 9920 of 9928 accelerometer error terms (skipped 8 out-of-bounds measurements)
Adding gyroscope error terms (/MTi/imu/data)
Added 9920 of 9928 gyroscope error terms (skipped 8 out-of-bounds measurements)
Before Optimization
===================
Reprojection error squarred (cam0): mean 1.50187064303e+11, median 118.807007046, std: 5.02941910586e+13
Gyro error squarred (imu0): mean 4.12239168167, median 0.0512514597239, std: 49.1127312275
Accelerometer error squarred (imu0): mean 20894.8453531, median 12511.898366, std: 64934.0333668
Transformation T_cam0_imu0 (imu0 to cam0, T_ci): [m]
[[ 0.17627035 -0.97390705 0.14294694 0. ]
[ 0.35324839 -0.07296031 -0.93268021 0. ]
[ 0.91877328 0.21489964 0.33117035 0. ]
[ 0. 0. 0. 1. ]]
cam0 to imu0 time: [s] (t_imu = t_cam + shift)
0.0199985681397
Optimizing...
No linear system solver set in the options. Defaulting to the sparse_cholesky solver
Using the sparse_cholesky linear system solver
Using the levenberg_marquardt trust region policy
No linear system solver set in the options. Defaulting to the sparse_cholesky solver
Using the sparse_cholesky linear system solver
Using the levenberg_marquardt trust region policy
Initializing
Optimization problem initialized with 19875 design variables and 145567 error terms
The Jacobian matrix is 469822 x 89421
[0.0]: J: 1.73915e+16
CHOLMOD warning: matrix not positive definite
Cholmod warning: matrix not positive definite.Solution failed
[WARNING] System solution failed
CHOLMOD warning: matrix not positive definite
Cholmod warning: matrix not positive definite.Solution failed
[WARNING] System solution failed
Last step was a regression. Reverting
[1]: J: 1.78272e+16, dJ: -4.35668e+14, deltaX: 0.466136, LM - lambda:3200 mu:8
[2]: J: 3.33499e+15, dJ: 1.40565e+16, deltaX: 0.24365, LM - lambda:51200 mu:16
[3]: J: 7.17186e+12, dJ: 3.32782e+15, deltaX: 0.34773, LM - lambda:36035.4 mu:2
Last step was a regression. Reverting
[4]: J: 1.06805e+13, dJ: -3.50861e+12, deltaX: 0.483382, LM - lambda:12011.8 mu:2
[5]: J: 1.88714e+12, dJ: 5.28472e+12, deltaX: 0.0831154, LM - lambda:48047.3 mu:4
[6]: J: 4.86929e+11, dJ: 1.40021e+12, deltaX: 0.160379, LM - lambda:16015.8 mu:2
[7]: J: 8.36631e+10, dJ: 4.03266e+11, deltaX: 0.0660644, LM - lambda:14197.9 mu:2
[8]: J: 1.26464e+10, dJ: 7.10168e+10, deltaX: 0.0464342, LM - lambda:10170.9 mu:2
[9]: J: 1.69796e+09, dJ: 1.09484e+10, deltaX: 0.0790615, LM - lambda:6665.28 mu:2
[10]: J: 2.88122e+08, dJ: 1.40984e+09, deltaX: 0.195211, LM - lambda:3816.2 mu:2
[11]: J: 1.21083e+08, dJ: 1.67039e+08, deltaX: 0.516421, LM - lambda:1743.72 mu:2
[12]: J: 8.64307e+07, dJ: 3.46526e+07, deltaX: 0.639429, LM - lambda:581.238 mu:2
[13]: J: 7.10944e+07, dJ: 1.53364e+07, deltaX: 0.935988, LM - lambda:193.746 mu:2
Last step was a regression. Reverting
[14]: J: 1.53e+12, dJ: -1.52992e+12, deltaX: 1.16416, LM - lambda:192.118 mu:2
[15]: J: 5.60945e+07, dJ: 1.49999e+07, deltaX: 0.237694, LM - lambda:768.472 mu:4
[16]: J: 4.35121e+07, dJ: 1.25824e+07, deltaX: 0.470958, LM - lambda:256.157 mu:2
Last step was a regression. Reverting
[17]: J: 5.54995e+31, dJ: -5.54995e+31, deltaX: 1.22015, LM - lambda:85.3858 mu:2
Last step was a regression. Reverting
[18]: J: 6.95436e+07, dJ: -2.60315e+07, deltaX: 0.337764, LM - lambda:341.543 mu:4
[19]: J: 4.10625e+07, dJ: 2.44959e+06, deltaX: 0.0685085, LM - lambda:2732.35 mu:8
[20]: J: 4.02584e+07, dJ: 804145, deltaX: 0.137335, LM - lambda:910.782 mu:2
[21]: J: 3.76476e+07, dJ: 2.61077e+06, deltaX: 0.267267, LM - lambda:303.594 mu:2
Last step was a regression. Reverting
[22]: J: 7.1917e+35, dJ: -7.1917e+35, deltaX: 1.05794, LM - lambda:101.198 mu:2
Last step was a regression. Reverting
[23]: J: 4.31159e+07, dJ: -5.46828e+06, deltaX: 0.225345, LM - lambda:404.792 mu:4
[24]: J: 3.72537e+07, dJ: 393837, deltaX: 0.0199395, LM - lambda:3238.34 mu:8
[25]: J: 3.69474e+07, dJ: 306325, deltaX: 0.0738241, LM - lambda:1079.45 mu:2
[26]: J: 3.53607e+07, dJ: 1.58673e+06, deltaX: 0.194131, LM - lambda:359.815 mu:2
Last step was a regression. Reverting
[27]: J: 2.04253e+30, dJ: -2.04253e+30, deltaX: 1.30837, LM - lambda:119.938 mu:2
Last step was a regression. Reverting
[28]: J: 3.7396e+07, dJ: -2.03532e+06, deltaX: 0.174623, LM - lambda:479.753 mu:4
[29]: J: 3.52077e+07, dJ: 152964, deltaX: 0.00828295, LM - lambda:3838.03 mu:8
[30]: J: 3.50426e+07, dJ: 165106, deltaX: 0.0486102, LM - lambda:1279.34 mu:2
[ERROR] [1410461994.780201]: Optimization failed!
Traceback (most recent call last):
File "/home/pkok/ros/repos/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_calibrate_imu_camera", line 206, in <module>
main()
File "/home/pkok/ros/repos/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_calibrate_imu_camera", line 182, in main
iCal.optimize(maxIterations=parsed.max_iter, recoverCov=parsed.recover_cov)
File "/home/pkok/ros/repos/kalibr/src/aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/IccCalibrator.py", line 181, in optimize
raise RuntimeError("Optimization failed!")
RuntimeError: Optimization failed!]