SLAM的精度评价标准,此处简单介绍EVO
一、evo学习
1.1 安装
1.2 数据格式(data formal):TUM/EuRoC/Kitti数据集
1.3 数据格式转换
1.3.1"把EuRoc的数据格式转化成TUM数据格式"
evo_traj euroc data.csv --save_as_tum
将生成的 KeyFrameNavStateTrajectory.txt 文件,格式如下。总共17位 (timestamp;position3;q4;v3;bw3;ba3)
转化成符合TUM 形式的轨迹文件格式:8位
timestamp x y z q_x q_y q_z q_w
1.3.2"TUM数据转换成kitti格式"
evo_traj tum traj_1.txt traj_2.txt traj_3.txt --save_as_kitti
1.3.3"TUM数据转换成bag格式"
" 把一些文件的数据格式转化成rosbag"
-
evo_traj tum traj_1.txt traj_2.txt traj_3.txt --save_as_bag
-
二、evo使用
2.1 Plot trajectory
evo_traj euroc v203_truth.csv --plot
2.2 Plot multiple trajectories
Here, we plot two KITTI pose files and the ground truth using
evo_traj
:cd test/data evo_traj kitti KITTI_00_ORB.txt KITTI_00_SPTAM.txt --ref=KITTI_00_gt.txt -p --plot_mode=xz
2.3 Run a metric on trajectories
关于APE、RPE比较详细的解释见
SLAM中的位姿与轨迹评价指标:APE、RPE、ATE、RTE`2.3.1 evo_ape
绝对位姿误差,常被用作绝对轨迹误差,比较估计轨迹和参考轨迹并计算整个轨迹的统计数据,适用于测试轨迹的全局一致性。
命令语法:命令 格式 参考轨迹 估计轨迹 [可选项]
其中格式包括euroc、tum等数据格式,可选项有对齐命令、画图、保存结果等。
For example, here we calculate the absolute pose error for two trajectories from ORB-SLAM and S-PTAM usingevo_ape
(KITTI_00_gt.txt
is the reference (ground truth)) and plot and save the individual results to .zip files forevo_res
:mkdir results evo_ape kitti KITTI_00_gt.txt KITTI_00_ORB.txt -r full -va --plot --plot_mode xz --save_results results/ORB.zip
命令的含义为:计算考虑平移和旋转部分误差的ape,进行平移和旋转对齐,以详细模式显示,保存画图并保存计算结果。
命令运行后得到结果如下图所示其中-r表示ape所基于的姿态关系
不添加-r/–pose_relation和可选项,则默认为trans_part。
-v表示verbose mode,详细模式,-a表示采用SE(3) Umeyama对齐,其余可选项如下表所示。不加-s表示默认尺度对齐参数为1.0,即不进行尺度对齐。
详情:
可通过 evo_ape +数据格式 + --help查看更多参数的含义以及如何使用。例如
evo_ape euroc --help2.3.2 evo_rpe
相对位姿误差不进行绝对位姿的比较,相对位姿误差比较运动(姿态增量)。相对位姿误差可以给出局部精度,例如slam系统每米的平移或者旋转漂移量。
命令语法:命令 格式 参考轨迹 估计轨迹 [可选项]
其中格式包括euroc、tum等数据格式,可选项有对齐命令、画图、保存结果等。
常用命令示例:evo_rpe euroc data.csv V102.txt -r angle_deg --delta 1 --delta_unit m -va --plot --plot_mode xyz --save_plot ./VIO --save_results ./VIO.zip
命令的含义为 求每米考虑旋转角的rpe,以详细模式显示并画图。
命令运行后得到结果如下图所示其中-r表示ape所基于的姿态关系
不添加-r/–pose_relation和可选项,则默认为trans_part。
–d/–delta表示相对位姿之间的增量,–u/–delta_unit表示增量的单位,可选参数为[f, d, r, m],分别表示[frames, deg, rad, meters]。–d/–delta -u/–delta_unit合起来表示衡量局部精度的单位,如每米,每弧度,每百米等。其中–delta_unit为f时,–delta的参数必须为整形,其余情况下可以为浮点型。–delta 默认为1,–delta_unit默认为f。
-v --plot --plot_mode xyz --save_results results/VINS.zip --save_plot等同evo_ape中所讲。
当在命令中加上–all_pairs,则计算rpe时使用位置数据中所有的对而不是仅连续对,此时,可以通过-t/–delta_tol控制–all_pairs模式下的相对增量的容差(relative delta tolerance)。需要注意–all_pairs下不能使用–plot函数。
可通过 evo_rpe +数据格式 + --help查看更多参数的含义以及如何使用。例如
evo_rpe euroc --help2.4 Process multiple results from a metric
evo_res
can be used to compare multiple result files from the metrics, i.e- print infos and statistics (default)
- plot the results
- save the statistics in a table
Here, we use the results from above to generate a plot and a table:
evo_ape/evo_rpe中将结果保存为.zip文件后,可以利用evo_res对不同的结果进行比较。
evo_res results/*.zip -p --save_table results/table.csv
evo_res --help可查看可选参数含义。
evo其他常用命令
结果如下所示:
参考evo: GitHub - MichaelGrupp/evo: Python package for the evaluation of odometry and SLAM
https://zhuanlan.zhihu.com/p/364825667
https://blog.youkuaiyun.com/Darlingqiang/article/details/102631102
从零开始学定位 — 使用kaist数据集进行LIO-SAM建图
三、KITTI数据集的评估
KITTI odometry evaluation tool的评估不同于evo,并且没有直接的转换工具,详细介绍见
视觉SLAM基础:算法精度评价指标KITTI odometry evaluation tool篇使用evo及kitti_odometry_evaluation测评slam轨迹
四、F1 score
此外,常常会见到max F1 score。具体定义见https://blog.youkuaiyun.com/qq_14997473/article/details/82684300