一种评估SLAM系统参数的实用工具
evo是一款Python版本SLAM系统的评估工具,其简单可用,下面是使用evo评估VIORB示例
具体使用细节总结如下:
用来评估SLAM系统测量数据以及输出估计优劣的Pyrhon工具
安装:
pip install evo --upgrade --no-binary evo
适用于数据集有:
TUM 轨迹文件
KITTI 位姿
EUROC .csv和.txt文件
ROS bag文件
关于数据格式:
具体用法:
(1)evo_traj euroc data.csv --plot
可直接输出 name: data
infos: 36382 poses, 80.626m path length, 181.905s duration
以及 trajectory xyz_view rpy_view 随时间变化的曲线图
(2)evo_traj euroc data.csv --save_as_tum
--save_as_bag
--save_as_kitti
保存为data.tum格式
(3)evo_ape (绝对位姿误差)evo_rpe(相对位姿误差) evo_rpe euroc --help
绝对位姿误差,常作为绝对轨迹误差使用。通过姿态关系直接估计和参考对应姿态。然后,计算整个轨迹的统计数据。这对于测试轨迹的全局一致性是有用的。
相对于绝对姿态的直接比较,相对姿态误差比较运动(“姿态三角”)。该度量给出了关于局部精度的见解,即漂移。例如,可以评估每米的平移或旋转漂移:
一般模式: command format reference-trajectory estimated-trajectory [options]
e.g evo_ape euroc data00.csv SaveTrajectory0.txt -va --plot --save_results ./result/ORB.ZIP
e.g evo_rpe tum reference.txt estimate.txt --pose_relation angle_deg --delta 1 --delta_unit m
bag模式:command bag bagfile-path reference-topic estimated-topic [options]
(4)绘制不同算法(ORB PTAM等)中与真实轨迹的图
evo_traj kitti KITTI_00_ORB.txt KITTI_00_SPTAM.txt --ref=KITTI_00_gt.txt -p --plot_mode=xz
(5)调整显示尺寸
evo_config set plot_figsize 5 4.5
evo_config reset 恢复默认设置
(6)处理不同结果
*First trajectory (ORB Stereo):*
mkdir results
evo_ape kitti KITTI_00_gt.txt KITTI_00_ORB.txt -va --plot --plot_mode xz --save_results results/ORB.zip
*Second trajectory (S-PTAM):*
evo_ape kitti KITTI_00_gt.txt KITTI_00_SPTAM.txt -va --plot --plot_mode xz --save_results results/SPTAM.zip
Here, we use the results from above to generate a plot and a table:
evo_res results/*.zip -p --save_table results/table.csv
自己实测显示结果:
--------------------------------------------------------------------------------
Forcing trajectory alignment implicitly (EuRoC ground truth is in IMU frame).
--------------------------------------------------------------------------------
Loaded 36382 stamps and poses from: data.csv
Loaded 3676 stamps and poses from: SaveTrajectory.txt
Synchronizing trajectories...
Found 3638 of max. 36382 possible matching timestamps between...
data.csv
and: SaveTrajectory.txt
..with max. time diff.: 0.01 (s) and time offset: 0.0 (s).
--------------------------------------------------------------------------------
Aligning using Umeyama's method...
Rotation of alignment:
[[-0.34671241 -0.88295882 0.31650314]
[-0.93757415 0.31641858 -0.14433985]
[ 0.02729867 -0.34678958 -0.93754561]]
Translation of alignment:
[ 4.78431507 -1.95239101 0.86022843]
Scale correction: 1.0
--------------------------------------------------------------------------------
Compared 3638 absolute pose pairs.
Calculating APE for translation part pose relation...
--------------------------------------------------------------------------------
APE w.r.t. translation part (m)
(with SE(3) Umeyama alignment)
max 0.361395
mean 0.163031
median 0.179523
min 0.023681
rmse 0.180996
sse 119.178913
std 0.078616
--------------------------------------------------------------------------------
Plotting results...