Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input stream error #8

Closed
JzHuai0108 opened this issue Dec 8, 2022 · 1 comment
Closed

input stream error #8

JzHuai0108 opened this issue Dec 8, 2022 · 1 comment

Comments

@JzHuai0108
Copy link

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
Copy link
Contributor

sihengt commented Dec 9, 2022

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.

@sihengt sihengt closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants