MichaelGrupp / evo

Python package for the evaluation of odometry and SLAM
https://michaelgrupp.github.io/evo/
GNU General Public License v3.0
3.32k stars 743 forks source link

Deformation of trajectory when performing alignment #652

Closed astef3 closed 2 months ago

astef3 commented 3 months ago

Hi,

firstly I would like to start with saying that you've done an outstanding job with this evaluation tool! I am quite new with the process of evaluation and your tool, so forgive me if I ask something silly. :)

I have tried using your tool for evaluation on my own datasets. My data is in format of rosbag, where the on trajectory is from type /nav_msgs/Odometry and the second on is tf data. Now the thing is that I want to align the two trajectories so I can perform the comparison. Non aligned trajectories and the data associated with them is shown in the pictures below:

nonAlignedData nonAligned

However, when I try to align them, the tested trajectory get deformed in comparison with the reference and I see that the number of poses for the tested trajectory is now lower, data and results shown below:

AlignedData Aligned

I would be really grateful, if you could give me your opinion on what is the possible cause for this and suggest any guidelines on how can I fix my issue. Now in my opinion, a thing that seamed weird to me is the path length in the non aligned trajectories, there is huge difference between the reference and the tested algorithm. In my opinion, this is maybe because in some situations the LiDAR odometry has some problems and it goes "back-and-forth" (the zoomed part in the image bellow)

zoomed

Best regards, Aleksandar

astef3 commented 2 months ago

Fixed it! Found error in my data. Now everything works nice.

MichaelGrupp commented 2 months ago

firstly I would like to start with saying that you've done an outstanding job with this evaluation tool! I am quite new with the process of evaluation and your tool, so forgive me if I ask something silly. :)

Thank you! There are no silly questions :smile:

One thing to add maybe: if you "see that the number of poses for the tested trajectory is now lower", it's probably because the trajectories are matched based on their timestamps before alignment. If there are not enough matches, it can introduces gaps. You can see how many poses are matched when you run it with --verbose / -v logging. See also: https://github.com/MichaelGrupp/evo/wiki/evo_traj#temporal-alignment

astef3 commented 2 months ago

Yes that was exactly the problem. Now we fixed it and its much better! Thank you for responding.