ethz-asl / kalibr

The Kalibr visual-inertial calibration toolbox
Other
4.21k stars 1.38k forks source link

Found EOF error after run kalibr_calibrate_cameras #614

Closed jiratto closed 1 year ago

jiratto commented 1 year ago

image

-target april_6x6_86x80cm.yaml
importing libraries
Initializing came:

Camera model: pinhole-equi
Dataset: 2023-05-15-20-48-34.bag
Topic: /inage_splitter/left

Number of images: 4655
Extracting calibration target corners
Progress 4655 / 4655 Time remaining: Traceback (most recent call last):
File "/home/o/kalib_ws/devel/lib/kalibr/kalibr_calibrate cameras”, line 15, in <module>
exec(compile(fh.read(), python_script, 'exec’), context)
File "/home/o/kalib_ws/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_calibrate cameras”, line 465, in <module>
main()
File "/home/o/kalib_ws/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_calibrate cameras”, line 179, in main
observations = kc.extractCornersFronataset(can.dataset, cam.ctarget. detector,
File "/home/o/kalib_ws/src/kalibr/aslam_offline_calibration/kalibr/python/kalibr_common/TargetExtractor.py”, line 81, in extractCornersFromDataset
for lidx, data in enumerate(iter(resultq.get, 'STOP')
File "<string>", line 2, tn get
File "/usr/lib/python3.8/multiprocessing/managers.py”, line 835, in _callmethod
kind, result = conn.recv()
File "/usr/lib/python3.8/nultiprocessing/connection.py”, line 250, in recv
buf = self. recv_bytes()
File "/usr/lib/python3.8/nultiprocessing/connection.py”, line 414, in _recv_bytes
buf = self. recv(4)
File "/usr/lib/python3.8/multiprocessing/connection.py”, line 383, in _recv
raise EOFError
EOFError
o@nuc ~/Downloads/bags/kalibr $ ll
jiratto commented 1 year ago

ubuntu 20.04 ROS noetic My command is $ rosrun kalibr kalibr_calibrate_cameras --target april_6x6_80x80cm.yaml --bag 2023-05-15-20-48-34.bag --topics /image_splitter/left /image_splitter/right --model pinhole-equi pinhole-equi

goldbattle commented 1 year ago

Looks like a python bug or something. Try running with --show-extraction to disable the multi-threading to see how that goes.

On Mon, May 15, 2023 at 12:08 PM jiratto @.***> wrote:

ubuntu 20.04 ROS noetic My command is $ rosrun kalibr kalibr_calibrate_cameras --target april_6x6_80x80cm.yaml --bag 2023-05-15-20-48-34.bag --topics /image_splitter/left /image_splitter/right --model pinhole-equi pinhole-equi --target april_6x6_80x80cm.yaml

— Reply to this email directly, view it on GitHub https://github.com/ethz-asl/kalibr/issues/614#issuecomment-1548148747, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ6TYUD4C2WJPKE4XMKV5LXGJII7ANCNFSM6AAAAAAYCNGCIM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jiratto commented 1 year ago

Thank you. success calibration stereo camera with --show-extration flag.

But when I calibrate cam_imu, found this error. image

jiratto commented 1 year ago
Before Optimization
===================
Normalized Residuals
----------------------------
Reprojection error (cam0):     mean 9.819484074305908, median 9.72128170198684, std: 3.089644063593948
Reprojection error (cam1):     mean 9.819860066049461, median 9.721814922188974, std: 3.088857040883915
Gyroscope error (imu0):        mean 1.0507985396730957, median 0.837442156029218, std: 1.0645790247044662
Accelerometer error (imu0):    mean nan, median nan, std: nan

Residuals
----------------------------
Reprojection error (cam0) [px]:     mean 9.819484074305908, median 9.72128170198684, std: 3.089644063593948
Reprojection error (cam1) [px]:     mean 9.819860066049461, median 9.721814922188974, std: 3.088857040883915
Gyroscope error (imu0) [rad/s]:     mean 0.07430267730637673, median 0.059216102737974285, std: 0.0752771047477489
Accelerometer error (imu0) [m/s^2]: mean nan, median nan, std: nan

Optimizing...
Using the block_cholesky linear system solver
Using the levenberg_marquardt trust region policy
Using the block_cholesky linear system solver
Using the levenberg_marquardt trust region policy
Initializing
Optimization problem initialized with 34484 design variables and 1222582 error terms
The Jacobian matrix is 2513016 x 155158
[0.0]: J: -nan
CHOLMOD warning: matrix not positive definite. file: ../Supernodal/t_cholmod_super_numeric.c line: 911
[WARNING] System solution failed
CHOLMOD warning: matrix not positive definite. file: ../Supernodal/t_cholmod_super_numeric.c line: 911
[WARNING] System solution failed
goldbattle commented 1 year ago

Likely the sensor data or timestamps is bad, not much I can recommend.

virajawate commented 3 weeks ago

https://github.com/ethz-asl/kalibr/issues/695