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

KITTI files of different length: "data matrices must have the same shape" #152

Closed
liangsongLee opened this issue Mar 17, 2019 · 7 comments
Closed
Labels

Comments

@liangsongLee
Copy link

Hello, I used orbslam2 to run KITTI in mono mode. And I got the trajectory .txt file of keyframes in the form of TUM. Then I use --save_as_kitti to transform the .txt file to KITTI's form. Finally, I use evo_traj kitti KeyFrameTrajectory.txt --ref=ground_truth.txt -p --plot_mode=xz . I got a plot without align. However, I dont know how to align it. Please help me , thank you very much.
image

@MichaelGrupp
Copy link
Owner

See here: https://github.com/MichaelGrupp/evo/wiki/evo_traj#geometric-alignment

So you could try this:

 evo_traj kitti KeyFrameTrajectory.txt --ref=ground_truth.txt -p --plot_mode=xz --correct_scale --align

@liangsongLee
Copy link
Author

Thank you, I tried this, but I got the error : data matrices must have the same shape

@MichaelGrupp
Copy link
Owner

Can you upload your data here?

@liangsongLee
Copy link
Author

OK, here are the datas.
ground_truth.txt
KeyFrameTrajectory.txt

@liangsongLee
Copy link
Author

And this is the trajectory file of sequence 09 of KITTI that I got from mono_kitti of ORBSLAM2 , which is in the form of TUM data before I saved it as form of kitti using your code here.
KeyFrameTrajectory_mono.txt

@MichaelGrupp
Copy link
Owner

The problem is that the kitti format doesn't have timestamps to do timestamp correspondence for alignment, so the only way to do it is that the number of poses must be exactly the same with this format. Formats with timestamps like tum don't have this problem.

But you can probably solve that. The KITTI dataset also has separate files that provide the timestamps.
From a similar issue #125 we wrote a script that can combine this timestamp file and a kitti poses file to a proper trajectory. You can download it here and use it to convert the ground truth to tum format:
https://github.com/MichaelGrupp/evo/blob/master/contrib/kitti_poses_and_timestamps_to_trajectory.py

@MichaelGrupp MichaelGrupp changed the title Scale of Mono-KITTI KITTI files of different length: "data matrices must have the same shape" Mar 17, 2019
@liangsongLee
Copy link
Author

OK, got it. thank you Michael.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants