从零开始Ubuntu16.04+ORBSLAM2+ROS实验实录四:ORBSLAM评估工具EVO的使用
前文: 从零开始Ubuntu16.04+ORBSLAM2+ROS实验实录(一):安装与配置 从零开始Ubuntu16.04+ORBSLAM2+ROS实验实录(二):相机测试与标定 从零开始Ubuntu16.04+ORBSLAM2+ROS实验实录三:使用USB相机运行ORBSLAM
1 工具安装
git clone https://github.com/MichaelGrupp/evo.git
cd evo
pip3 install --editable . --upgrade --no-binary evo
执行下面指令验证安装是否成功:
$ evo_ape -h
usage: evo_ape [-h] {kitti,tum,euroc,bag} ...
Absolute pose error (APE) metric app (c) evo authors
positional arguments:
{kitti,tum,euroc,bag}
optional arguments:
-h, --help show this help message and exit
2 数据测试
cd test/data
evo_traj kitti KITTI_00_ORB.txt KITTI_00_SPTAM.txt --ref=KITTI_00_gt.txt -p --plot_mode=xz
若测试通过说明EVO配置无误,本文在配置过程中遇到下面问题,特作记录。
错误1 : ImportError cannot import name _imaging from PIL [ERROR] evo module evo.main_ape crashed - no logfile written (disabled)
解决方法:更新Pillow库,根据matplotlib3.4.2要求,Pillow库版本应大于等于6.2.0,pyparsing版本应大于2.2.1这里对它们进行升级。由于matplotlib同时依赖两个库,因此升级过程遇到
错误1.1 :ERROR: pip’s dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts 即依赖冲突 。
解决方法:直接卸载当前的pillow和pyparsing,重新安装
pip3 install pillow==6.2.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install pyparsing==2.2.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
更新完毕后问题解决。
错误2 : File “/home/winter/.local/lib/python3.8/site-packages/matplotlib/backends/backend_tkagg.py”, line 1, in from . import _backend_tk File “/home/winter/.local/lib/python3.8/site-packages/matplotlib/backends/_backend_tk.py”, line 7, in import tkinter as tk ModuleNotFoundError: No module named ‘tkinter’
[ERROR] evo module evo.main_ape crashed - no logfile written (disabled)
解决方法:安装tkinter库
sudo apt install tk-dev
# 本文使用3.8版本python,因为evo要求Python版本大于3.7
sudo apt-get install python3.8-tk
至此,测试完毕。
|