当前位置:   article > 正文

利用evo将kitti数据集真值轨迹由kitti格式转为tum格式_kitti格式转tum

kitti格式转tum

(1)首先是序列对应问题:

00: 2011_10_03_drive_0027
01: 2011_10_03_drive_0042
02: 2011_10_03_drive_0034
03: 2011_09_26_drive_0067
04: 2011_09_30_drive_0016
05: 2011_09_30_drive_0018
06: 2011_09_30_drive_0020
07: 2011_09_30_drive_0027
08: 2011_09_30_drive_0028
09: 2011_09_30_drive_0033
10: 2011_09_30_drive_0034

从网上复制的,前面是对应的序列,明确自己需要的序列号。

(2)contrib/kitti_poses_and_timestamps_to_trajectory.py · master · mirrors / michaelgrupp / evo · GitCode

从这个里面下载 kitti_poses_and_timestamps_to_trajectory.py程序

(3)下载对应的poses文件  xx.txt文件

下载链接为(https://s3.eu-central-1.amazonaws.com/avg-kitti/data_odometry_poses.zip

以及times.txt文件,下载链接为https://s3.eu-central-1.amazonaws.com/avg-kitti/data_odometry_gray.zip

高达20多G。 

 我这里只放了前11个,文件夹结构如下:

 (4)执行如下代码生成tum格式的数据(下面以07文件夹为例)

python2 kitti_poses_and_timestamps_to_trajectory.py data_odometry_poses/dataset/poses/07.txt  sequences/07/times.txt sequences/07/tum_07_gt.txt

或者执行如下脚本

  1. for i in {0..10}
  2. do
  3. if [ $i -le 9 ]; then
  4. python2 kitti_poses_and_timestamps_to_trajectory.py data_odometry_poses/dataset/poses/0$i.txt sequences/0$i/times.txt sequences/0$i/tum_0${i}_gt.txt
  5. else
  6. python2 kitti_poses_and_timestamps_to_trajectory.py data_odometry_poses/dataset/poses/$i.txt sequences/$i/times.txt sequences/$i/tum_${i}_gt.txt
  7. fi
  8. done

最终生成的tum数据文件名为tum_xx_gt.txt

evo_traj tum sequences/00/tum_00_gt.txt  -p

evo_traj tum sequences/01/tum_01_gt.txt  -p

evo_traj tum sequences/02/tum_02_gt.txt  -p

evo_traj tum sequences/03/tum_03_gt.txt  -p

 evo_traj tum sequences/04/tum_04_gt.txt  -p

evo_traj tum sequences/05/tum_05_gt.txt  -p

evo_traj tum sequences/06/tum_06_gt.txt  -p

evo_traj tum sequences/07/tum_07_gt.txt  -p

evo_traj tum sequences/08/tum_08_gt.txt  -p

evo_traj tum sequences/09/tum_09_gt.txt  -p

evo_traj tum sequences/10/tum_10_gt.txt  -p

我已经将生成好的数据打包上传了资源,有需要的搜索下载。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/116606
推荐阅读
相关标签
  

闽ICP备14008679号