SLAM精度测评——EVO
-
1.install
GitHub - MichaelGrupp/evo: Python package for the evaluation of odometry and SLAM
注意:安裝好依賴!
sudo apt install python-pip
pip install evo --upgrade --no-binary evo
or
pip install evo --upgrade --no-binary evo --user
pip install numpy --upgrade --user
-
2.數據格式(data formal):TUM/EuRoC/Kitti數據集
- 格式轉換
-
3數據格式轉換
-
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
-
3.2"TUM數據轉換成kitti格式"
evo_traj tum traj_1.txt traj_2.txt traj_3.txt --save_as_kitti
-
3.3"TUM數據轉換成kitti格式"
- " 把一些文件的數據格式轉化成rosbag"
-
evo_traj tum traj_1.txt traj_2.txt traj_3.txt --save_as_bag -
4.evo使用
evo_traj euroc v203_truth.csv --plot
-
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
-
3.Run a metric on trajectories
-
3.1?evo_ape
絕對位姿誤差,常被用作絕對軌跡誤差,比較估計軌跡和參考軌跡并計算整個軌跡的統計數據,適用于測試軌跡的全局一致性。
命令語法:命令 格式 參考軌跡 估計軌跡 [可選項]
其中格式包括euroc、tum等數據格式,可選項有對齊命令、畫圖、保存結果等。
For example, here we calculate the absolute pose error for two trajectories from ORB-SLAM and S-PTAM using?evo_ape?(KITTI_00_gt.txt?is the reference (ground truth)) and plot and save the individual results to .zip files for?evo_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 --help
-
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 --help
-
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
總結
以上是生活随笔為你收集整理的SLAM精度测评——EVO的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 墨镜换独角兽一套亏赚?
- 下一篇: 有没有人知道杨幂这条裙子是什么牌子哒??