下载evo源码:
git clone https://github.com/MichaelGrupp/evo.git
cd到evo目录下
pip install --user evo --upgrade --no-binary evo (don't forget to add --user)
这个过程一旦开始,后续需要下载依赖项的资源包,因为相应服务器在国外,速度很慢,乃至出现超时的问题。所以使用国内清华大学的镜像进行安装,上述命令改成
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --editable . --upgrade --no-binary evo
完成后,在原来的终端输入下述命令。(sudo python setup.py develop:当你安装一个包后,这个包需要你不断修改,这样你就不得不重新安装,这时就采用这种安装方法。)
sudo python3 setup.py develop
若提示提示numpy的版本过低,不满足要求。此时进行numpy的升级。(我这里并没有提示版本问题)
sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy -I
在终端运行命令
evo
若弹出evo的说明界面,验证evo的安装成功。
ython package for the evaluation of odometry and SLAM
Supported trajectory formats:
* TUM trajectory files
* KITTI pose files
* ROS bagfile with geometry_msgs/PoseStamped, geometry_msgs/TransformStamped,
geometry_msgs/PoseWithCovarianceStamped or nav_msgs/Odometry topics
* EuRoC MAV dataset groundtruth files
The following executables are available:
Metrics:
evo_ape - absolute pose error
evo_rpe - relative pose error
Tools:
evo_traj - tool for analyzing, plotting or exporting multiple trajectories
evo_res - tool for processing multiple result files from the metrics
evo_ipython - IPython shell with pre-loaded evo modules
evo_fig - (experimental) tool for re-opening serialized plots
evo_config - tool for global settings and config file manipulation
测试
如果将下面的–plot_mode设置为xyz,那么就可以得到3D的图.
cd test/data
evo_traj kitti KITTI_00_ORB.txt KITTI_00_SPTAM.txt --ref=KITTI_00_gt.txt -p --plot_mode=xz
终端显示:
name: KITTI_00_ORB
infos: 4541 poses, 3705.098m path length
--------------------------------------------------------------------------------
name: KITTI_00_SPTAM
infos: 4541 poses, 3718.501m path length
--------------------------------------------------------------------------------
name: KITTI_00_gt
infos: 4541 poses, 3724.187m path length