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

ValueError: Expected quat to have shape (4,) or (N x 4), got (2,). #13

Closed
daekyounglee opened this issue Mar 29, 2022 · 5 comments
Closed

Comments

@daekyounglee
Copy link

Hi, I had a problem when I ran the code "python stray_visualize.py --point-clouds".

When I run the code with example datasets "ZB2", I got an error:

Traceback (most recent call last):
File "/home/user/Desktop/new1/sv5/stray_visualize.py", line 206, in
main()
File "/home/user/Desktop/new1/sv5/stray_visualize.py", line 190, in main
data = read_data(flags)
File "/home/user/Desktop/new1/sv5/stray_visualize.py", line 53, in read_data
T_WC[:3, :3] = Rotation.from_quat(quaternion).as_matrix()
File "rotation.pyx", line 624, in scipy.spatial.transform.rotation.Rotation.from_quat
File "rotation.pyx", line 513, in scipy.spatial.transform.rotation.Rotation.init
ValueError: Expected quat to have shape (4,) or (N x 4), got (2,).

I have no idea why this error occurred.
Thank you for reading my issues, hope you reply.

@kekeblom
Copy link
Owner

kekeblom commented Mar 30, 2022

Would you mind sharing the scene you used as input? Did you run it as python stray_visualize.py <scene_directory> --point-clouds. I just ran tried the latest code with the latest version of the app and it seems to be working.

Would you mind sharing your scene and I could take a closer look?

@daekyounglee
Copy link
Author

I understood the word "scene" as "dataset". Is it right?
If so, um.... I didn't use my own dataset. I used your second example dataset (file name: ZB2) as input which you uploaded.
If you want, I could share the dataset, but there will be no differences from the file you uploaded before.
And yes, I ran it as " python stray_visualize.py <dataset_directory> --point-clouds " .

I wonder if I did something wrong in the process.
At first, I downloaded datasets and Installed dependencies. Next, I created a video from the Depth Maps by "python make_video.py " . Then I ran the code " python stray_visualize.py <dataset_directory> --point-clouds " and I got the error. Is there anything I did wrong?

Thank you.

@kekeblom
Copy link
Owner

kekeblom commented Apr 1, 2022

Ah, good point. Those are from an old version of the app. I forgot about those. I'll update those to some more recent ones. Thing is, I changed the data format slightly since I recorded those.

@kekeblom
Copy link
Owner

kekeblom commented Apr 4, 2022

@daekyounglee updated the readme with a more recent scan. Let me know if that fixes your problem.

@kekeblom kekeblom closed this as completed Apr 4, 2022
@daekyounglee
Copy link
Author

Thanks for your quick update.
I ran the code by the new dataset you uploaded and it worked successfully.
Thanks!

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