the htl is GitHub - MichaelGrupp/evo: Python package for the evaluation of odometry and SLAM
其支持的消息格式包括:
-
'TUM' trajectory files
-
'KITTI' pose files
-
'EuRoC MAV' (.csv groundtruth and TUM trajectory file)
-
ROS and ROS2 bagfile with
geometry_msgs/PoseStamped,geometry_msgs/TransformStamped,geometry_msgs/PoseWithCovarianceStampedornav_msgs/Odometrytopics or TF messagesMetrics:
-
evo_ape- absolute pose error -
evo_rpe- relative pose error -
Tools:
-
evo_traj- tool for analyzing, plotting or exporting one or more trajectories -
evo_res- tool for comparing one or multiple result files fromevo_apeorevo_rpe -
evo_fig- (experimental) tool for re-opening serialized plots (saved with--serialize_plot) -
evo_config- tool for global settings and config file manipulation
evo_xxx tum 要求两个轨迹的点的时间戳中,至少要有一对的时间戳的间隔不能大于0.01s
后面会出现的一些统计学中的关于误差的说明:
max 9.929606 最大误差
mean 4.978019 平均误差 误差平均值
median 4.921627 误差中间值 (中位数):
min 0.788493 误差最小值
rmse 5.509938 均方根误差 RMSE: root mean square error 均方根误差
编辑 其指定是真实值与估计值之间的误差,反映的精度
sse 77416.518038 残差平方和 ,Sum of Squares due to Error
std 2.361936 标准差 Standard Deviation 标准差
STD是表示测量值与均值之间的符合程度,即离散程度,表示的是测量值内部的稳定性;RMS是表示测量值与真实值之间的符合程度,是和真实值做比较
关于这些格式的说明,
TUM格式比较常见,我们可以在将轨迹输出为txt文件,每一行的保存格式为:
# timestamp(s) tx ty tz qx qy qz qw
在对于这种数据格式的文件时,多是.txt文件,其命令是
evo_xxx tum xxx ..., 比如在evo源码的test文件夹中的freiburg1_xyz-groundtruth.txt就是按照TUM的格式排列的,进行几个操作
evo_traj tum freiburg1_xyz-groundtruth.txt --plot --plot_mode xz
结果如下图
编辑
evo_xxx 数据类型 --help 可以获得指令的相关解释
如果有参考真实轨迹即高精度作为参考时
evo_traj kitti KITTI_00_ORB.txt KITTI_00_SPTAM.txt --ref=KITTI_00_gt.txt -p --plot_mode=xz
evo_traj tum fr2_desk_ORB.txt fr2_desk_ORB_kf_mono.txt --ref=fr2_desk_groundtruth.txt --plot --plot_mode=xz --save_plot result/11 保存轨迹图片
计算显示绝对误差,这里指的是相对于高精度的真实轨迹
evo_ape命令:
**evo_ape:**绝对位姿误差,常被用作绝对轨迹误差,比较估计轨迹和参考轨迹并计算整个轨迹的统计数据,适用于测试轨迹的全局一致性。
注意evo_ape默认情况下计算的是ATE(相当于默认加了参数-r tran_part),如果想计算APE,可以加上参数-r full
以tum类型的为例, 不同的数据类型通过--help查询
evo_ape tum freiburg1_xyz-groundtruth.txt freiburg1_xyz-ORB_kf_mono.txt -va --plot --plot_mode xz --save_results ./yqorb.zip
evo_ape tum 参考轨迹 被测轨迹 -r full -va --plot --plot_mode xz --save_results ./文件名.zip
evo_ape tum fr2_desk_groundtruth.txt fr2_desk_ORB.txt --t_max_diff 3 -v --plot
在时间上,默认最近的不能大于0.01s, 这个可以设置 --t_max_diff 3
如果时间上每对齐,而是数量上差不多,可以把tum转成kitti来做,kitti是没有时间的
编辑
编辑
**evo_rpe: **相对位姿误差,不进行绝对位姿的比较,相对位姿误差比较运动(姿态增量)。相对位姿误差可以给出局部精度,例如slam系统每米的平移或者旋转漂移量。
evo_rpe tum freiburg1_xyz-groundtruth.txt freiburg1_xyz-rgbdslam.txt -r full --delta 1 --delta_unit m --all_pairs -va --plot --plot_mode xyz
--delta 1 --delta_unit m 表示的是每一米比较一次相对真实轨迹的轨迹误差
evo_res 比较前面通过ape或rpe得到的.rpe的结果
evo_res results/*.zip -v --plot --save_table results/table.csv --save_plot results/apeplot
编辑
\