用evo工具评估SLAM轨迹

SLAM 专栏收录该内容
4 篇文章 0 订阅

evo github 地址:https://github.com/MichaelGrupp/evo

不同格式的轨迹文件及相互转换:https://github.com/MichaelGrupp/evo/wiki/Formats

问题汇总:https://github.com/MichaelGrupp/evo/issues?q=is%3Aissue+is%3Aclosed

1、安装 evo

sudo apt install python-pip
pip install evo --upgrade --no-binary evo

出现问题: 

Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/lib/python2.7/dist-packages/dateutil/relativedelta.pyc'
Consider using the `--user` option or check the permissions.

解决:

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

2、测试

cd ~/alan_dataset/EuRoC/mav0/state_groundtruth_estimate0
evo_traj euroc data.csv --plot

出现问题:

name:	data
infos:	19753 poses, 91.747m path length, 98.760s duration
/usr/lib/python2.7/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
[ERROR] Unhandled error in evo.main_traj
Traceback (most recent call last):
  File "/home/jinshan.lan/.local/lib/python2.7/site-packages/evo/entry_points.py", line 90, in launch
    main_module.run(args)
  File "/home/jinshan.lan/.local/lib/python2.7/site-packages/evo/main_traj.py", line 342, in run
    from evo.tools.plot import PlotMode
  File "/home/jinshan.lan/.local/lib/python2.7/site-packages/evo/tools/plot.py", line 36, in <module>
    import mpl_toolkits.mplot3d.art3d as art3d
  File "/usr/lib/python2.7/dist-packages/mpl_toolkits/__init__.py", line 2, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 637, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 834, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
ContextualVersionConflict: (numpy 1.11.0 (/usr/lib/python2.7/dist-packages), Requirement.parse('numpy>=1.12.0'), set(['pandas']))

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

解决:

pip install numpy --upgrade --user

运行结果:

3、将 EuRoC 数据集中 .csv 文件形式的 groundtruth 转换为 TUM 形式的轨迹文件

evo_traj euroc data.csv --save_as_tum

TUM 形式的轨迹文件格式:

每行8个数,用空格分隔,包含时间戳(单位:秒)、位置和旋转(四元素表示)

timestamp x y z q_x q_y q_z q_w

4、多轨迹显示(轨迹未对齐)

(a)上面将 EuRoC 数据集中 MH_04_difficult 序列的 groundtruth(.csv文件) 转换为 TUM 形式的轨迹文件,文件名为 data.tum

(b)通过双目 ORBSLAM 跑 MH_04_difficult 数据集得到 TUM 形式的轨迹文件,文件名为 FrameTrajectory_TUM_Format.txt

见:ORB_SLAM2 & VI-ORBSLAM 相关(#alan#)

将两个 TUM 形式的轨迹文件放入同一个文件夹 (test_evo) 中

cd ~/Desktop/test_evo
evo_traj tum FrameTrajectory_TUM_Format.txt --ref=data.tum -p

运行结果:

 

5、计算绝对位姿误差(轨迹对齐)

evo_ape tum data.tum FrameTrajectory_TUM_Format.txt -va --plot

运行结果:

    

 

参考:

知乎:一种评估SLAM系统参数的实用工具

使用 evo 工具评测 VI ORB SLAM2 在 EuRoC 上的结果

©️2021 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值