input stream error
JzHuai0108 opened this issue · 1 comments
JzHuai0108 commented
Traceback (most recent call last):
File "/media/jhuai/Seagate2TB/jhuai/tools/continuous-time/tartancalib_ws/devel/lib/kalibr/tartan_calibrate", line 15, in <module>
exec(compile(fh.read(), python_script, 'exec'), context)
File "/media/jhuai/Seagate2TB/jhuai/tools/continuous-time/tartancalib_ws/src/tartancalib/aslam_offline_calibration/kalibr/python/tartan_calibrate", line 654, in <module>
main()
File "/media/jhuai/Seagate2TB/jhuai/tools/continuous-time/tartancalib_ws/src/tartancalib/aslam_offline_calibration/kalibr/python/tartan_calibrate", line 514, in main
tartanlogs.append(TartanLogging.TartanLogger(obsdb_init,[copy.deepcopy(cam_.geometry) for cam_ in calibrator.cameras],kcc.getAllPointStatistics(calibrator,0)))
File "/media/jhuai/Seagate2TB/jhuai/tools/continuous-time/tartancalib_ws/src/tartancalib/aslam_offline_calibration/kalibr/python/tartan_calibrate", line 514, in <listcomp>
tartanlogs.append(TartanLogging.TartanLogger(obsdb_init,[copy.deepcopy(cam_.geometry) for cam_ in calibrator.cameras],kcc.getAllPointStatistics(calibrator,0)))
File "/usr/lib/python3.8/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.8/copy.py", line 272, in _reconstruct
y.__setstate__(state)
RuntimeError: input stream error
Some log prior to the error message is given below.
Progress 515 / 525 Time remaining: 0s
Progress 521 / 525 Time remaining: 0s
Progress 525 / 525 Time remaining: Initialization of focal length failed. You can enable manual input by setting 'KALIBR_MANUAL_FOCAL_LENGTH_INIT'.
�[31m[ERROR] [1670477639.529250]: initialization of focal length for cam with topic /cam0/image_raw failed �[0m
Extracted corners for 457 images (of 525 images)
Projection initialized to: [nan nan nan nan]
Distortion initialized to: [nan nan nan nan]
initializing initial guesses
initialized cam0 to:
projection cam0: [nan nan nan nan]
distortion cam0: [nan nan nan nan]
initializing calibrator
STARTING MODE
PolarOptions.NONE
starting calibration...
Dear authors,
Thanks for your great work.
This error appears to me caused by the failure to initialize focal length. I think it is better to terminate the program earlier in that case.
sihengt commented
Hi JzHuai0108, thank you for trying out TartanCalib.
TartanCalib is built upon Kalibr, and this issue is closed in Kalibr's issue #346. The fix would be to set the KALIBR_MANUAL_FOCAL_LENGTH_INIT manual variable to 1 (automatically done in our DockerFiles!), and to manually input the focal length when prompted.