EVO的安装

初步学习可以根据下面的链接找到更多资源:
官方地址

用evo工具评估SLAM轨迹

第一步:终端输入:

pip install evo --upgrade --no-binary evo
报错:
Collecting evo
  Downloading https://files.pythonhosted.org/packages/d2/01/1ff9e8fd3841327813c0927f8f5b4f83c05d9d284786033133bfa6a888f5/evo-1.7.2.tar.gz (117kB)
    17% |█████▋                          | 20kB 3.4kB/s eta 0:00:29Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 577, in _prepare_file
    session=self.session, hashes=hashes)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 810, in unpack_url
    hashes=hashes
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 649, in unpack_http_url
    hashes)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 871, in _download_http_url
    _download_url(resp, link, content_file, hashes)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 595, in _download_url
    hashes.check_against_chunks(downloaded_chunks)
  File "/usr/lib/python2.7/dist-packages/pip/utils/hashes.py", line 46, in check_against_chunks
    for chunk in chunks:
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 563, in written_chunks
    for chunk in chunks:
  File "/usr/lib/python2.7/dist-packages/pip/utils/ui.py", line 139, in iter
    for x in it:
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 552, in resp_read
    decode_content=False):
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/response.py", line 344, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/response.py", line 311, in read
    flush_decoder = True
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/response.py", line 240, in _error_catcher
    raise ReadTimeoutError(self._pool, None, 'Read timed out.')
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
You are using pip version 8.1.1, however version 20.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

报错原因是pip version的问题,升级:

pip install --upgrade pip

报错:

Collecting pip
  Downloading https://files.pythonhosted.org/packages/54/2e/df11ea7e23e7e761d484ed3740285a34e38548cf2bad2bed3dd5768ec8b9/pip-20.1-py2.py3-none-any.whl (1.5MB)
    100% |████████████████████████████████| 1.5MB 21kB/s 
Installing collected packages: pip
Successfully installed pip-8.1.1
You are using pip version 8.1.1, however version 20.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

(怎么升级了还是8.1.1??还是提示升级??)
于是换一种方式升级(那就只好用wget了):

sudo apt-get update
sudo apt-get upgrade
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
pip --version

升级成功:
EVO的安装_第1张图片

还是接着第一步:安装EVO:

pip install evo --upgrade --no-binary evo
又报错(超时的问题):
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting evo
  Downloading evo-1.7.2.tar.gz (117 kB)
     |████████████████████████████████| 117 kB 5.9 kB/s 
Requirement already satisfied, skipping upgrade: numpy in /usr/lib/python2.7/dist-packages (from evo) (1.11.0)
Requirement already satisfied, skipping upgrade: matplotlib in /usr/lib/python2.7/dist-packages (from evo) (1.5.1)
Collecting scipy>=1.2
  Downloading scipy-1.2.3-cp27-cp27mu-manylinux1_x86_64.whl (24.8 MB)
     || 194 kB 3.7 kB/s eta 1:51:10ERROR: Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/base_command.py", line 188, in _main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/req_command.py", line 185, in wrapper
    return func(self, options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/commands/install.py", line 333, in run
    reqs, check_supported_wheels=not options.target_dir
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/resolution/legacy/resolver.py", line 179, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/resolution/legacy/resolver.py", line 362, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/resolution/legacy/resolver.py", line 314, in _get_abstract_dist_for
    abstract_dist = self.preparer.prepare_linked_requirement(req)
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/prepare.py", line 412, in prepare_linked_requirement
    hashes=hashes,
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/prepare.py", line 198, in unpack_url
    hashes=hashes,
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/prepare.py", line 124, in get_http_url
    link, downloader, temp_dir.path, hashes
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/prepare.py", line 220, in _download_http_url
    for chunk in download.chunks:
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/cli/progress_bars.py", line 166, in iter
    for x in it:
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/network/utils.py", line 39, in response_chunks
    decode_content=False,
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/response.py", line 564, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/response.py", line 529, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/urllib3/response.py", line 430, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

解决方法,设置超时时间:

pip --default-timeout=100 install -U Pillow

设置完成:如下图:
EVO的安装_第2张图片

还是进行第一步,安装EVO:

pip install evo --upgrade --no-binary evo

输出如下信息:

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
  warnings.warn(warning, RequestsDependencyWarning)
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting evo
  Using cached evo-1.7.2.tar.gz (117 kB)
Requirement already satisfied, skipping upgrade: numpy in /usr/lib/python2.7/dist-packages (from evo) (1.11.0)
Requirement already satisfied, skipping upgrade: matplotlib in /usr/lib/python2.7/dist-packages (from evo) (1.5.1)
Collecting scipy>=1.2
  Downloading scipy-1.2.3-cp27-cp27mu-manylinux1_x86_64.whl (24.8 MB)
     |████████████████████████████████| 24.8 MB 531 bytes/s 
Collecting pandas
  Downloading pandas-0.24.2-cp27-cp27mu-manylinux1_x86_64.whl (10.1 MB)
     |████████████████████████████████| 10.1 MB 80 kB/s 
Collecting seaborn>=0.9
  Downloading seaborn-0.9.1-py2.py3-none-any.whl (216 kB)
     |████████████████████████████████| 216 kB 58 kB/s 
Collecting natsort
  Downloading natsort-6.2.1-py2.py3-none-any.whl (37 kB)
Collecting argcomplete
  Downloading argcomplete-1.11.1-py2.py3-none-any.whl (36 kB)
Collecting colorama>=0.3
  Downloading colorama-0.4.3-py2.py3-none-any.whl (15 kB)
Requirement already satisfied, skipping upgrade: pygments in /usr/lib/python2.7/dist-packages (from evo) (2.1)
Requirement already satisfied, skipping upgrade: pyyaml in /usr/lib/python2.7/dist-packages (from evo) (3.11)
Requirement already satisfied, skipping upgrade: pillow in /usr/local/lib/python2.7/dist-packages (from evo) (6.2.2)
Requirement already satisfied, skipping upgrade: enum34 in /usr/lib/python2.7/dist-packages (from evo) (1.1.2)
Collecting python-dateutil>=2.5.0
  Downloading python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
     |████████████████████████████████| 227 kB 46 kB/s 
Requirement already satisfied, skipping upgrade: pytz>=2011k in /usr/lib/python2.7/dist-packages (from pandas->evo) (2014.10)
Collecting importlib-metadata<2,>=0.23; python_version == "2.7"
  Downloading importlib_metadata-1.6.0-py2.py3-none-any.whl (30 kB)
Requirement already satisfied, skipping upgrade: six>=1.5 in /usr/lib/python2.7/dist-packages (from python-dateutil>=2.5.0->pandas->evo) (1.10.0)
Collecting contextlib2; python_version < "3"
  Downloading contextlib2-0.6.0.post1-py2.py3-none-any.whl (9.8 kB)
Collecting pathlib2; python_version < "3"
  Downloading pathlib2-2.3.5-py2.py3-none-any.whl (18 kB)
Collecting zipp>=0.5
  Downloading zipp-1.2.0-py2.py3-none-any.whl (4.8 kB)
Collecting configparser>=3.5; python_version < "3"
  Downloading configparser-4.0.2-py2.py3-none-any.whl (22 kB)
Collecting scandir; python_version < "3.5"
  Downloading scandir-1.10.0.tar.gz (33 kB)
Skipping wheel build for evo, due to binaries being disabled for it.
Building wheels for collected packages: scandir
  Building wheel for scandir (setup.py) ... done
  Created wheel for scandir: filename=scandir-1.10.0-cp27-cp27mu-linux_x86_64.whl size=38910 sha256=0a8b69eb9244abfe68c70c2b72a642988fef1ec78a2a74cb32d37e64042d3fb6
  Stored in directory: /home/yk/.cache/pip/wheels/58/2c/26/52406f7d1f19bcc47a6fbd1037a5f293492f5cf1d58c539edb
Successfully built scandir
ERROR: pandas 0.24.2 has requirement numpy>=1.12.0, but you'll have numpy 1.11.0 which is incompatible.
ERROR: seaborn 0.9.1 has requirement matplotlib>=1.5.3, but you'll have matplotlib 1.5.1 which is incompatible.
Installing collected packages: scipy, python-dateutil, pandas, seaborn, natsort, contextlib2, scandir, pathlib2, zipp, configparser, importlib-metadata, argcomplete, colorama, evo
    Running setup.py install for evo ... done
Successfully installed argcomplete-1.11.1 colorama-0.4.3 configparser-4.0.2 contextlib2-0.6.0.post1 evo-1.7.2 importlib-metadata-1.6.0 natsort-6.2.1 pandas-0.24.2 pathlib2-2.3.5 python-dateutil-2.8.1 scandir-1.10.0 scipy-1.2.3 seaborn-0.9.1 zipp-1.2.0

从打印信息中看到(numpy和matplotlib需要升级):

ERROR: pandas 0.24.2 has requirement numpy>=1.12.0, but you'll have numpy 1.11.0 which is incompatible.
ERROR: seaborn 0.9.1 has requirement matplotlib>=1.5.3, but you'll have matplotlib 1.5.1 which is incompatible.

于是升级:

pip install numpy --upgrade --user
pip install matplotlib --upgrade --user

第二步:测试(测一把ORB-SLAM2的轨迹文件):

evo_traj tum KeyFrameTrajectory.txt --plot

打印出轨迹信息,并且显示可视化界面:

name:	KeyFrameTrajectory
infos:	77 poses, 11.516m path length, 76.000s duration

EVO的安装_第3张图片




EVO的使用:
轨迹评估工具使用总结(一) 基操evo

轨迹评估工具使用总结(二) evo 绘图& ROS map
视觉SLAM笔记–第3篇: SLAM轨迹评估工具(evo安装与使用)
SLAM评估工具evo的使用

max: 表示最大误差;
mean:平均误差;
median:误差中位数;
min: 最小误差;
rmse:均方根误差;
sse: 和方差、误差平方和;
std: 标准差

安装成功,运行报错:

yk@yk-B250-N:~$ evo_traj tum '/home/yk/桌面/yang1.txt' -p
--------------------------------------------------------------------------------
name:	yang1
infos:	69 poses, 1250.044m path length, 69.000s duration
[ERROR] Unhandled error in evo.main_traj
Traceback (most recent call last):
  File "/home/yk/evo/evo/entry_points.py", line 98, in launch
    main_module.run(args)
  File "/home/yk/evo/evo/main_traj.py", line 381, in run
    from evo.tools import plot
  File "/home/yk/evo/evo/tools/plot.py", line 42, in <module>
    import seaborn as sns
  File "/home/yk/.local/lib/python2.7/site-packages/seaborn/__init__.py", line 6, in <module>
    from .rcmod import *
  File "/home/yk/.local/lib/python2.7/site-packages/seaborn/rcmod.py", line 6, in <module>
    from . import palettes, _orig_rc_params
  File "/home/yk/.local/lib/python2.7/site-packages/seaborn/palettes.py", line 12, in <module>
    from .utils import desaturate, set_hls_values, get_color_cycle
  File "/home/yk/.local/lib/python2.7/site-packages/seaborn/utils.py", line 8, in <module>
    import pandas as pd
  File "/home/yk/.local/lib/python2.7/site-packages/pandas/__init__.py", line 23, in <module>
    from pandas.compat.numpy import *
  File "/home/yk/.local/lib/python2.7/site-packages/pandas/compat/__init__.py", line 438, in <module>
    raise ImportError('dateutil 2.5.0 is the minimum required version')
ImportError: dateutil 2.5.0 is the minimum required version

[ERROR] evo module evo.main_traj crashed - no logfile written (disabled)

解决方法:

//非root用户

sudo pip uninstall python-dateutil

sudo apt-get install python-dateutil

//root用户

pip uninstall python-dateutil

apt-get install python-dateutil

你可能感兴趣的:(SLAM,ubuntu下安装包安装)