uzh-rpg / rpg_trajectory_evaluation

Toolbox for quantitative trajectory evaluation of VO/VIO
MIT License
1.06k stars 348 forks source link

How to use the dataset_tools "transform_trajectory.py"? #9

Open FrankXue95 opened 5 years ago

FrankXue95 commented 5 years ago

Hello, this tool is really useful for us, but it is first time for me to use it. From our odometry, we could obtain the absolute coordinates in the world coordinate system and we can also get the 44 relative transformation matrix. To use this tool, we need to transfer our 44 matrix to the format of quaternion, but we do not know how to use the tool "transform_trajectory.py" , what is the true input format (it only written "Comma separated rows" in the code) and how to output the available data? Could you please give a detailed example to use it? thank you!

zhangzichao commented 5 years ago

Hi, sorry for the late reply. I don't have a detailed example now, but the parameter transformation should point to a file similar to

# Transformation T_HE
5.798803966029131e-1, -5.243452865009353e-1, -6.235388890517578e-1, -3.537084841910371e-2
5.601360558458526e-1, -2.991685865692151e-1, 7.724932075763710e-1, 6.588057192258504e-3
-5.915964203552116e-1, -7.972202815623987e-1, 1.202227020511080e-1, -2.464106641941784e-2
 0, 0, 0, 1.0

Regarding the output, the script will write the transformed trajectory to a text file transformed_poses.txt.

FrankXue95 commented 5 years ago

Thanks!