Skip to content

Error regarding camera_meta.lens_pose_rotation #17

@seongminjung

Description

@seongminjung

Hello,
I am currently trying to run visual-inertial SLAM using your app.
I successfully installed the app and recorded a video, but I cannot calibrate my camera.

When I try to run this code:

python data2kalibr.py /data --tag-size 0.11 --subsample 30

It gives me this error:

Traceback (most recent call last):
  File "data2kalibr.py", line 120, in <module>
    create_camera_yaml(proto, camera_yaml_path, args.matlab_calibration)
  File "data2kalibr.py", line 19, in create_camera_yaml
    q = Quaternion(c.lens_pose_rotation[3], *c.lens_pose_rotation[:3])
IndexError: list index (3) out of range

Apparently it is caused by this part of the file:

def create_camera_yaml(proto, camera_yaml_path, matlab_calibration=None):
    c = proto.camera_meta
    est_focal_length = proto.video_meta[0].est_focal_length_pix
    q = Quaternion(c.lens_pose_rotation[3], *c.lens_pose_rotation[:3])
    print('intrinsics: ', c.intrinsic_params)
    P = q.transformation_matrix
    print("Translation")
    print(c.lens_pose_translation)
...

I am struggling to find what caused this error. Is it because camera_meta variable has no attribute lens_pose_rotation?
I checked out issue #5 so I know that it is fine to not have intrinsic_param.

I would appreciate your suggestion or advice.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions