foreword
The main content of this post is to sort out how to use evo and various commands, excluding installation steps and processes, please move to other bloggers if you have not installed it yet.
The public dataset formats currently supported by evo are: TUM, KITTI, EuRoC and ROS bagfile . If the data set format used is one of these, then evo can be used directly for accuracy-related content evaluation without additional data format processing.
1. evo_traj trajectory management
You can open any number of tracks, view statistical information, and count the corresponding track length in the current file.
evo_traj tum results.txt groundtruth.txt -v -p --full_check
[-v] : Display in verbose mode; [--full_check] : You can check the trace. (See 2. Optional supplement in evo_ape for details)
evo_traj tum results.txt --ref=groundtruth.txt -va -p --save_plot traj_va_results.pdf
[-a] : Pose alignment; [-s] : Scale alignment; [--plot_mode=xy] : The drawing mode is xy two-dimensional graph. (See 2. Optional supplement in evo_ape for details)
Added: Convert track format
evo_traj tum data.csv --save_as_kitti
* | –save_as_bag | –save_as_kitti | –save_as_tum |
---|---|---|---|
bag | yes | yes | yes |
euroc | yes | yes | yes |
kitty | no(no timestamps) | yes | no(no timestamps) |
tum | yes | yes | yes |
2. evo_ape calculates the absolute trajectory error
APE absolute pose error, often called absolute trajectory error, compares the estimated trajectory with the reference trajectory and calculates the statistics of the entire trajectory, which is suitable for testing the global accuracy and global consistency of the trajectory.
1. Definition in Lecture 14:
(1) Root mean square error of pose:
(2) Translation root mean square error:
Explanation: Assuming that the estimated pose and the actual pose timestamp are aligned, the total number of frames is n; the algorithm estimates the pose P1 , P2 , … , Pn ∈ SE(3); the real pose Q1 , Q2 , … , Qn ∈ SE (3).
2. The actual situation:
The estimated pose and groundtruth are usually not in the same coordinate system, so we need to align the two first. For binocular SLAM and RGB-D SLAM , the scale is uniform, so we need to calculate a transformation matrix S ∈ SE(3) from the estimated pose to the real pose by the least square method; for monocular cameras , there is scale uncertainty , we need to compute a similarity transformation matrix S ∈ Sim(3) from the estimated pose to the true pose.
Furthermore, in fact, the pose error corresponding to each frame is:
The corresponding pose error and translation error become:
3. Command:
Command syntax:
命令 数据集格式 参考轨迹 估计轨迹 [可选项]
The data set format includes data formats such as euroc and tum;
Fill in txt or csv format files in the reference and estimated trajectory;
Options include alignment commands, drawing, saving results, etc.
Optional additions:
(1) -r/–pose_relation optional parameter: select translation or rotation error
Without -r/--pose_relation and options, the default is trans_part.
-r/--pose_relation optional parameter | meaning |
---|---|
full | Represents the ape obtained by considering both rotation and translation errors, unit-less |
trans_part | Consider the ape obtained by the translation part, the unit is m |
rot_part | Consider the ape obtained by the rotation part, unit-less |
angle_you | Consider the ape obtained by the rotation angle, unit ° (deg) |
angle_rad | Consider the ape obtained by the rotation angle, unit radian (rad) |
(2) -v, -a, -s options: Alignment selection (can be combined arbitrarily, for example: -va, -vas, etc.)
Order | meaning |
---|---|
-v | verbose mode, in verbose mode |
-a / –align | Uses SE(3) Umeyama alignment, only handles translation and rotation |
-as / –align --correct_scale | Using Sim(3) Umeyama alignment while handling translation rotation and scale |
-s / –correct_scale | Align scale only |
Alignment effect (from reference):
(3) Drawing, saving files and help options:
Example: Using the TUM data set, calculate the ape considering the translation part error, perform translation, rotation and scale alignment, display in detailed mode, save the drawing result as a PDF file and save the calculation result as a zip file.
evo_ape tum groundtruth.txt results_new.txt -r trans_part -vas --plot --save_plot ape_trans_vas.pdf --save_results ape_trans_vas.zip
3. evo_rpe calculates relative trajectory error
The relative pose error does not compare the absolute pose, and the relative pose error compares the movement (attitude increment). The relative pose error can give local accuracy, such as the amount of translational or rotational drift per meter of the slam system.
1. Definition in Lecture 14:
(1) Relative trajectory error:
(2) Only take the translation part (△-fixed time difference):
Explanation: Assuming that the estimated pose and the actual pose timestamp are aligned, the total number of frames is n; the algorithm estimates the pose P1 , P2 , … , Pn ∈ SE(3); the real pose Q1 , Q2 , … , Qn ∈ SE (3).
2. The actual situation:
The relative pose error corresponding to each frame is:
It is equivalent to directly measuring the error of the odometer. The selection of Δ directly affects the result of RMSE. In order to comprehensively measure the performance of the algorithm, all values of Δ can be traversed as follows:
3. Command:
evo_rpe tum groundtruth.txt results.txt -r trans_part -d 1 -u m -va -p --save_plot rpe_trans_va.pdf --save_results rpe_trans_va.zip
–d/–delta : Indicates the increment between relative poses; –u/–delta_unit : Indicates the unit of the increment, the optional parameters are [f, d, r, m], respectively representing [frames, deg, rad , meters]; combined to represent per meter, per hundred meters, etc. –d defaults to 1, –u defaults to f.
Four, evo_res result comparison
evo_res results1.txt results2.txt -v -p --save_plot comparsion.pdf
Five, evo_config global settings and configuration file operations
evo_config set plot_seaborn_style whitegrid 将画图背景更改成白色网格
evo_config set plot_fontfamily serif plot_fontscale 1.2 将字体改为衬线型并调为1.2倍大小
evo_config set plot_reference_linestyle - 将画图所使用的线型改为 -
evo_config set plot_figsize 10 9 将所画图的图像大小调整为10 9(宽 高)
evo_config reset 将参数还原到默认值
parameter | meaning | optional |
---|---|---|
plot_export_format | Image storage format when outputting images | Commonly used png, pdf, etc. |
plot_linewidth | The width of the line when drawing | Width supported by matplotlib, default 1.5 |
plot_reference_color | the color of the reference track in the image | black,red,green等 |
plot_reference_linestyle | Linetype of the reference track | Line styles supported by matplotlib, default – |
plot_seaborn_style | Image backgrounds and grids | whitegrid,darkgrid,white,dark |
plot_split | Whether to display/store images separately | false/true |
plot_figsize | Image size for drawing | The default width and height are 6, other values can be used |
table_export_format | Tabular data output format | Commonly used csv, excel, latex, json |
Reference link:
4. Introduction to ORBSLAM dataset and evo evaluation tool_orbslam evo_Z-way's Blog-CSDN Blog