ubunut20.4 ros-noetic
kitti数下载
http://www.cvlibs.net/datasets/kitti/raw_data.php
2011_09_26_drive_0005_sync
├── 2011_09_26
│ ├── 2011_09_26_drive_0005_sync
│ ├── calib_cam_to_cam.txt
│ ├── calib_imu_to_velo.txt
│ └── calib_velo_to_cam.txt
└── kitti_2011_09_26_drive_0005_synced.bag
cd 2011_09_26_drive_0005_sync
kitti2bag -t 2011_09_26 -r 0005 raw_synced .
kitti2bag
https://github.com/tomas789/kitti2bag/
安装和转换
安装ros(提示tf error)
安装opencv-python
要安装到系统环境的python环境下,不要安装在anaconda环境下
pip install kitti2bag
再次转换:
kitti2bag -t 2011_09_26 -r 0005 raw_synced .
发生报错:
Could not load module 'pykitti'. Please run pip install pykitti
实际pykitti已经安装。输入以下,可以显示缺失的库,安装即可
python
import pykitti
Failed to find match for field intensity
whereis kitti2bag
# kitti2bag: /home/qqq/.local/bin/kitti2bag
gedit /home/qqq/.local/bin/kitti2bag
#修改前
fields = [PointField('x', 0, PointField.FLOAT32, 1),
PointField('y', 4, PointField.FLOAT32, 1),
PointField('z', 8, PointField.FLOAT32, 1),
PointField('i', 12, PointField.FLOAT32, 1)]
修改后
fields = [PointField('x', 0, PointField.FLOAT32, 1),
PointField('y', 4, PointField.FLOAT32, 1),
PointField('z', 8, PointField.FLOAT32, 1),
PointField('intensity', 12, PointField.FLOAT32, 1)]