自学内容网 自学内容网

SLAM评估工具evo学习

参考链接

官方github:https://github.com/MichaelGrupp/evo

一、 指令分析

1.1 tum数据集,evo_ape指令

evo_ape {kitti,tum,euroc,bag} -h
evo_ape tum -h

(1) 终端输入:

evo_ape tum -h

(2) 终端打印:

usage: evo_ape tum [-h]
                   [-r {full,trans_part,rot_part,angle_deg,angle_rad,point_distance}]
                   [-a] [-s] [--n_to_align N_TO_ALIGN] [--align_origin] [-p]
                   [--plot_mode {xy,xz,yx,yz,zx,zy,xyz}]
                   [--plot_x_dimension {index,seconds,distances}]
                   [--plot_colormap_max PLOT_COLORMAP_MAX]
                   [--plot_colormap_min PLOT_COLORMAP_MIN]
                   [--plot_colormap_max_percentile PLOT_COLORMAP_MAX_PERCENTILE]
                   [--plot_full_ref] [--ros_map_yaml ROS_MAP_YAML]
                   [--save_plot SAVE_PLOT] [--serialize_plot SERIALIZE_PLOT]
                   [--save_results SAVE_RESULTS] [--logfile LOGFILE]
                   [--no_warnings] [-v] [--silent] [--debug] [-c CONFIG]
                   [--t_max_diff T_MAX_DIFF] [--t_offset T_OFFSET]
                   [--t_start T_START] [--t_end T_END]
                   ref_file est_file

Absolute pose error (APE) metric app for TUM trajectory files - (c) evo
authors

positional arguments:
  ref_file              reference trajectory file
  est_file              estimated trajectory file

optional arguments:
  -h, --help            show this help message and exit
  --t_max_diff T_MAX_DIFF
                        maximum timestamp difference for data association
  --t_offset T_OFFSET   constant timestamp offset for data association
  --t_start T_START     only use data with timestamps greater or equal this
                        start time
  --t_end T_END         only use data with timestamps less or equal this end
                        time

algorithm options:
  -r {full,trans_part,rot_part,angle_deg,angle_rad,point_distance}, --pose_relation {full,trans_part,rot_part,angle_deg,angle_rad,point_distance}
                        pose relation on which the APE is based
  -a, --align           alignment with Umeyama's method (no scale)
  -s, --correct_scale   correct scale with Umeyama's method
  --n_to_align N_TO_ALIGN
                        the number of poses to use for Umeyama alignment,
                        counted from the start (default: all)
  --align_origin        align the trajectory origin to the origin of the
                        reference trajectory

output options:
  -p, --plot            show plot window
  --plot_mode {xy,xz,yx,yz,zx,zy,xyz}
                        the axes for plot projection
  --plot_x_dimension {index,seconds,distances}
                        dimension that is used on the x-axis of the raw value
                        plot(default: seconds, or index if no timestamps are
                        present)
  --plot_colormap_max PLOT_COLORMAP_MAX
                        the upper bound used for the color map plot (default:
                        maximum error value)
  --plot_colormap_min PLOT_COLORMAP_MIN
                        the lower bound used for the color map plot (default:
                        minimum error value)
  --plot_colormap_max_percentile PLOT_COLORMAP_MAX_PERCENTILE
                        percentile of the error distribution to be used as the
                        upper bound of the color map plot (in %, overrides
                        --plot_colormap_max)
  --plot_full_ref       plot the full, unsynchronized reference trajectory
  --ros_map_yaml ROS_MAP_YAML
                        yaml file of an ROS 2D map image (.pgm/.png) that will
                        be drawn into the plot
  --save_plot SAVE_PLOT
                        path to save plot
  --serialize_plot SERIALIZE_PLOT
                        path to serialize plot (experimental)
  --save_results SAVE_RESULTS
                        .zip file path to store results
  --logfile LOGFILE     Local logfile path.

usability options:
  --no_warnings         no warnings requiring user confirmation
  -v, --verbose         verbose output
  --silent              don't print any output
  --debug               verbose output with additional debug info
  -c CONFIG, --config CONFIG
                        .json file with parameters (priority over command line
                        args)

(3) 终端打印解释:

这段内容是 evo_ape 工具的命令行帮助信息,它提供了如何使用该工具来计算TUM轨迹文件的绝对位姿误差(Absolute Pose Error, APE)的详细说明。evo_ape 是一个用于评估视觉里程计(VO)或同时定位与建图(SLAM)系统性能的工具,特别是针对TUM数据集中的轨迹文件。

以下是命令行参数的解释:

位置参数

  • ref_file:参考轨迹文件,通常是ground truth轨迹。
  • est_file:估计轨迹文件,即你的视觉里程计或SLAM系统生成的轨迹。

可选参数

  • -h, --help:显示帮助信息并退出。
  • --t_max_diff T_MAX_DIFF:数据关联的最大时间戳差异。
  • --t_offset T_OFFSET:数据关联的恒定时间戳偏移。
  • --t_start T_START:只使用时间戳大于或等于这个开始时间的数据。
  • --t_end T_END:只使用时间戳小于或等于这个结束时间的数据。

算法选项

  • -r {full,trans_part,rot_part,angle_deg,angle_rad,point_distance}, --pose_relation {full,trans_part,rot_part,angle_deg,angle_rad,point_distance}:基于哪种位姿关系计算APE。
  • -a, --align:使用Umeyama方法(不包括尺度)进行对齐。
  • -s, --correct_scale:使用Umeyama方法进行尺度校正。
  • --n_to_align N_TO_ALIGN:用于Umeyama对齐的位姿数量,从开始计数(默认:全部)。
  • --align_origin:将轨迹原点与参考轨迹的原点对齐。

输出选项

  • -p, --plot:显示绘图窗口。
  • --plot_mode {xy,xz,yx,yz,zx,zy,xyz}:绘图投影的轴。
  • --plot_x_dimension {index,seconds,distances}:用于原始值绘图的x轴的维度(默认:秒,或者如果没有时间戳则为索引)。
  • --plot_colormap_max PLOT_COLORMAP_MAX:用于颜色图绘图的上界(默认:最大误差值)。
  • --plot_colormap_min PLOT_COLORMAP_MIN:用于颜色图绘图的下界(默认:最小误差值)。
  • --plot_colormap_max_percentile PLOT_COLORMAP_MAX_PERCENTILE:用作颜色图绘图上界的误差分布的百分位数(%,覆盖 --plot_colormap_max)。
  • --plot_full_ref:绘制完整的、未同步的参考轨迹。
  • --ros_map_yaml ROS_MAP_YAML:ROS 2D地图图像(.pgm/.png)的yaml文件,将被绘制在绘图中。
  • --save_plot SAVE_PLOT:保存绘图的路径。
  • --serialize_plot SERIALIZE_PLOT:序列化绘图的路径(实验性)。
  • --save_results SAVE_RESULTS:存储结果的.zip文件路径。
  • --logfile LOGFILE:本地日志文件路径。

可用性选项

  • --no_warnings:不显示需要用户确认的警告。
  • -v, --verbose:详细输出。
  • --silent:不打印任何输出。
  • --debug:带有额外调试信息的详细输出。
  • -c CONFIG, --config CONFIG:带有参数的.json文件(优先级高于命令行参数)。

这个工具主要用于研究和开发中,以评估和比较不同视觉里程计或SLAM系统的精度和鲁棒性。通过计算估计轨迹与参考轨迹之间的误差,研究人员和开发者可以了解他们系统的优缺点,并据此进行改进。

(4) 额外说明:

-va-v -a

当你运行 evo_ape -va 命令时,这里的 -v-a 是两个命令行参数:

  • -v:这是 --verbose 的简写形式,表示启用详细输出模式。启用这个选项后,evo_ape 会输出更多的信息,包括处理过程中的中间步骤和额外的细节,这有助于用户了解评估过程的具体情况和诊断潜在的问题。

  • -a:这是 --align 的简写形式,表示启用Umeyama算法进行位姿对齐。Umeyama算法是一种著名的点云配准方法,它可以在不考虑尺度变化的情况下,通过最小化两组点云之间的误差来估计它们之间的旋转和平移关系。在评估轨迹时,这个选项可以用来对齐参考轨迹和估计轨迹,以便更准确地计算它们之间的误差。

因此,evo_ape -va 命令的作用是启用详细输出模式,并在计算APE之前对参考轨迹和估计轨迹进行对齐。这通常用于调试和优化视觉里程计或SLAM系统,因为它提供了足够的信息来分析系统的准确性和鲁棒性,并帮助开发者理解系统在哪些方面可能需要改进。

1.2 tum数据集,evo_traj指令

(1) 终端输入:

evo_traj tum -h

(2) 终端打印:

usage: evo_traj tum [-h] [-f] [-a] [-s] [--n_to_align N_TO_ALIGN]
                    [--align_origin] [--sync]
                    [--transform_left TRANSFORM_LEFT]
                    [--transform_right TRANSFORM_RIGHT]
                    [--propagate_transform] [--invert_transform] [--ref REF]
                    [--t_offset T_OFFSET] [--t_max_diff T_MAX_DIFF] [--merge]
                    [-p] [--plot_relative_time]
                    [--plot_mode {xy,xz,yx,yz,zx,zy,xyz}]
                    [--ros_map_yaml ROS_MAP_YAML] [--save_plot SAVE_PLOT]
                    [--save_table SAVE_TABLE]
                    [--serialize_plot SERIALIZE_PLOT] [--save_as_tum]
                    [--save_as_kitti] [--save_as_bag] [--logfile LOGFILE]
                    [--no_warnings] [-v] [--show_full_names] [--silent]
                    [--debug] [-c CONFIG]
                    traj_files [traj_files ...]

trajectory analysis and manipulation tool for TUM trajectory files - (c) evo
authors

positional arguments:
  traj_files            one or multiple trajectory files

optional arguments:
  -h, --help            show this help message and exit
  -f, --full_check      run all checks and print all stats

algorithm options:
  -a, --align           alignment with Umeyama's method (no scale) - requires
                        --ref
  -s, --correct_scale   scale correction with Umeyama's method - requires
                        --ref
  --n_to_align N_TO_ALIGN
                        the number of poses to use for Umeyama alignment,
                        counted from the start (default: all)
  --align_origin        align the trajectory origin to the origin of the
                        reference trajectory
  --sync                associate trajectories via matching timestamps -
                        requires --ref
  --transform_left TRANSFORM_LEFT
                        path to a .json file with a transformation to apply to
                        the trajectories (left multiplicative)
  --transform_right TRANSFORM_RIGHT
                        path to a .json file with a transformation to apply to
                        the trajectories (right_multiplicative)
  --propagate_transform
                        with --transform_right: transform each pose and
                        propagate resulting drift to the next.
  --invert_transform    invert the transformation of the .json file
  --ref REF             trajectory that will be marked/used as the reference
  --t_offset T_OFFSET   add a constant timestamp offset (not adding to --ref
                        trajectory)
  --t_max_diff T_MAX_DIFF
                        maximum timestamp difference for data association
  --merge               merge the trajectories in a single trajectory

output options:
  -p, --plot            show plot window
  --plot_relative_time  show timestamps relative to the start of the reference
  --plot_mode {xy,xz,yx,yz,zx,zy,xyz}
                        the axes for plot projection
  --ros_map_yaml ROS_MAP_YAML
                        yaml file of an ROS 2D map image (.pgm/.png) that will
                        be drawn into the plot
  --save_plot SAVE_PLOT
                        path to save plot
  --save_table SAVE_TABLE
                        path to save table with statistics
  --serialize_plot SERIALIZE_PLOT
                        path to serialize plot (experimental)
  --save_as_tum         save trajectories in TUM format (as *.tum)
  --save_as_kitti       save poses in KITTI format (as *.kitti)
  --save_as_bag         save trajectories in ROS bag as <date>.bag
  --logfile LOGFILE     Local logfile path.

usability options:
  --no_warnings         no warnings requiring user confirmation
  -v, --verbose         verbose output
  --show_full_names     don't shorten input file paths when displaying
                        trajectory names
  --silent              don't print any output
  --debug               verbose output with additional debug info
  -c CONFIG, --config CONFIG
                        .json file with parameters (priority over command line
                        args)

(3) 终端打印的解释

evo_traj 是一个用于分析和操作TUM轨迹文件的工具。它提供了多种功能,包括轨迹对齐、尺度校正、时间戳同步、转换应用、合并轨迹等。以下是命令行参数的详细解释:

位置参数

  • traj_files:一个或多个轨迹文件。

可选参数

  • -h, --help:显示帮助信息并退出。
  • -f, --full_check:运行所有检查并打印所有统计信息。

算法选项

  • -a, --align:使用Umeyama方法进行对齐(不包括尺度)-需要指定--ref
  • -s, --correct_scale:使用Umeyama方法进行尺度校正-需要指定--ref
  • --n_to_align N_TO_ALIGN:用于Umeyama对齐的位姿数量,从开始计数(默认:全部)。
  • --align_origin:将轨迹原点与参考轨迹的原点对齐。
  • --sync:通过匹配时间戳来关联轨迹-需要指定--ref
  • --transform_left TRANSFORM_LEFT:左乘法变换的.json文件路径,用于应用于轨迹的变换。
  • --transform_right TRANSFORM_RIGHT:右乘法变换的.json文件路径,用于应用于轨迹的变换。
  • --propagate_transform:与--transform_right一起使用:变换每个位姿,并将结果漂移到下一个位姿。
  • --invert_transform:反转.json文件中的变换。
  • --ref REF:将被标记/用作参考的轨迹。
  • --t_offset T_OFFSET:添加一个恒定的时间戳偏移(不添加到--ref轨迹)。
  • --t_max_diff T_MAX_DIFF:数据关联的最大时间戳差异。
  • --merge:将轨迹合并为单个轨迹。

输出选项

  • -p, --plot:显示绘图窗口。
  • --plot_relative_time:显示相对于参考开始的时间戳。
  • --plot_mode {xy,xz,yx,yz,zx,zy,xyz}:绘图投影的轴。
  • --ros_map_yaml ROS_MAP_YAML:ROS 2D地图图像(.pgm/.png)的yaml文件路径,将被绘制在绘图中。
  • --save_plot SAVE_PLOT:保存绘图的路径。
  • --save_table SAVE_TABLE:保存统计表格的路径。
  • --serialize_plot SERIALIZE_PLOT:序列化绘图的路径(实验性)。
  • --save_as_tum:以TUM格式(*.tum)保存轨迹。
  • --save_as_kitti:以KITTI格式(*.kitti)保存位姿。
  • --save_as_bag:以ROS bag格式(.bag)保存轨迹。
  • --logfile LOGFILE:本地日志文件路径。

可用性选项

  • --no_warnings:不显示需要用户确认的警告。
  • -v, --verbose:详细输出。
  • --show_full_names:在显示轨迹名称时不缩短输入文件路径。
  • --silent:不打印任何输出。
  • --debug:带有额外调试信息的详细输出。
  • -c CONFIG, --config CONFIG:带有参数的.json文件(优先级高于命令行参数)。

这个工具主要用于研究和开发中,以分析和比较不同视觉里程计或SLAM系统的轨迹。通过计算和可视化轨迹之间的差异,研究人员和开发者可以了解他们系统的准确性和鲁棒性,并据此进行改进。


原文地址:https://blog.csdn.net/BIT_HXZ/article/details/142994972

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!