接着SLAM系统测评写,EVO工具的使用,在写论文时常用到的基础命令.参数修改** 首先安装**
11.pip ,直接安装最新的稳定发行版;
pip install evo --upgrade --no-binary evo
1.2.源码安装
从github上下载evo工具
git clone https://github.com/MichaelGrupp/evo.git
在evo路径下执行以下命令
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple evo --upgrade --no-binary evo
ubuntu16中pip 升级遇到问题https://blog.csdn.net/creative1/article/details/125077375?spm=1001.2014.3001.5502
2.evo常用参数设置命令
2.1 evo_config 用法——常用配置,如设置字体 曲线颜色、粗细 背景有无网格等基本参数
evo_config show --brief
显示如下内容:
{
“console_logging_format”: “%(message)s”,
“euler_angle_sequence”: “sxyz”,
“global_logfile_enabled”: false,
“plot_axis_marker_scale”: 0.0,
“plot_backend”: “Qt5Agg”,
“plot_export_format”: “pdf”,
“plot_figsize”: [
6,
6
],
“plot_fontfamily”: “sans-serif”,
“plot_fontscale”: 1.0,
“plot_invert_xaxis”: false,
“plot_invert_yaxis”: false,
“plot_linewidth”: 1.5,
“plot_multi_cmap”: “none”,
“plot_reference_alpha”: 0.5,
“plot_reference_color”: “black”,
“plot_reference_linestyle”: “–”,
“plot_seaborn_palette”: “deep6”,
“plot_seaborn_style”: “darkgrid”,
“plot_split”: false,
“plot_statistics”: [
“rmse”,
“median”,
“mean”,
“std”,
“min”,
“max”
],
“plot_texsystem”: “pdflatex”,
“plot_trajectory_alpha”: 0.75,
“plot_trajectory_cmap”: “jet”,
“plot_trajectory_linestyle”: “-”,
“plot_usetex”: false,
“plot_xyz_realistic”: true,
“ros_map_alpha_value”: 1.0,
“ros_map_unknown_cell_value”: 205,
“save_traj_in_zip”: false,
“table_export_data”: “stats”,
“table_export_format”: “csv”,
“table_export_transpose”: true
}
(1)画图背景调整成白色网格
evo_config set plot_seaborn_style whitegrid
可以对比下图,背景变成白色网格
参数还可以选择以下 darkgrid, whitegrid, dark, white, ticks
(2)将字体改为衬线型并调为1.5倍大小
evo_config set plot_fontfamily serif plot_fontscale 1.5
(3).将画图所使用的线型改为 实线
evo_config set plot_reference_linestyle -
虚线则是:
evo_config set plot_reference_linestyle --
(4).将所画图的图像大小调整为10 9(宽 高)
evo_config set plot_figsize 10 9
(5)修改线条,其中bright可以替换成deep, muted, bright, pastel, dark, colorblind
evo_config set plot_seaborn_palette pastel
evo_traj tum ORB-SLAM2.txt DS-SLAM.txt --ref=groundtruth.txt -va --plot --plot_mode xy
evo_config set plot_seaborn_palette bright
evo_traj tum ORB-SLAM2.txt DS-SLAM.txt --ref=groundtruth.txt -va --plot --plot_mode xy
(6)参考轨迹ref的透明度 修改
evo_config set plot_reference_alpha 0.75
(7)恢复初始设置
evo_config reset
3.论文中常用画图命令
以TUM数据集为例
3.1评估算法输出的曲线和真实值之间的绝对误差(absolute pose error)
mkdir results
evo_ape tum fr2_desk_groundtruth.txt fr2_desk_ORB.txt -va --plot --plot_mode xz --save_results results/ORB_fr2_desk.zip
也可表示
evo_ape tum groundtruth.txt CameraTrajectory.txt -va --plot --plot_mode xz --save_results results/ORB_fr2_desk.zip
其中 fr2_desk_groundtruth.txt为对应数据集中的真实轨迹数据groundtruth.txt,fr2_desk_ORB.txt表示在相应数据集下生成的估计的相机轨迹 CameraTrajectory.txt
3.2 绘制多条曲线(evo_traj)
在一张图中绘制两个算法的输出曲线
evo_traj tum freiburg1_xyz-ORB_kf_mono.txt freiburg1_xyz-rgbdslam.txt --ref=freiburg1_xyz-groundtruth.txt -va --plot --plot_mode xy```
姿态角yaw/pitch /roll轨迹对比
轨迹对比
平移方向x/y/z方向轨迹对比
3.3相对位姿误差平移部分 (默认)
CameraTrajectory.txt我这里命名为ORB-SLAM2.txt 为了多轨迹对比
evo_rpe tum groundtruth.txt CameraTrajectory.txt -va --plot --plot_mode xz --save_results results/rpe.zip
3.4相对位姿误差旋转部分
evo_rpe tum -r rot_part groundtruth.txt ORB-SLAM2.txt -va --plot --plot_mode xz --save_results results/rpe_rot.zip
3.5绝对位姿个指标对比max min mean rmse…
首先建立一个新的文件夹将某个数据及下的groundtruth.txt放进去,然后将你要进行对比SLAM系统在此数据及下生成的 CameraTrajectory.txt复制进来并进行重命名 这里选取DynaSLAM DS-SLAM ORB-SLAM2三个系统进行对比
并在此文件下建立results文件保存zip结果。
evo_ape tum groundtruth.txt DS-SLAM.txt -va --plot --plot_mode xz --save_results results/DSSLAM.zip
evo_ape tum groundtruth.txt DynaSLAM.txt -va --plot --plot_mode xz --save_results results/DynaSLAM.zip
evo_ape tum groundtruth.txt ORB-SLAM2.txt -va --plot --plot_mode xz --save_results results/ORB-SLAM2.zip
results文件下有三个压缩文件
evo_res results/*.zip -p --save_table results/table.csv
当然随着evo_config set plot_seaborn_palette bright设置不一样,柱状图颜色也在变