我正在使用pykitti包来可视化python中的KITTI数据集。找不到需要的校准文件。它在指定的目录中查找这些校准文件。我指定了它应该在其中查找这些文件的目录。但是,它仍然给我一个错误:
FileNotFoundError:[Errno 2]没有这样的文件或目录:'/home/spb5151/Downloads/KITTI_Data/2011_09_26/calib_imu_to_速度.txt'
它说它在我的代码。但是,我已确认此文件位于此目录中。我使用Pycharm作为linux上的IDE。我是python和linux的新手,所以在语法方面有什么我可能遗漏的地方吗?在import sys
sys.path.insert(0, '/home/spb5151/Documents/pykitti-master')
import pykitti
basedir = '/home/spb5151/Downloads/KITTI_Data'
date = '2011_09_26'
drive = '0019'
# The 'frames' argument is optional - default: None, which loads the whole dataset.
# Calibration and timestamp data are read automatically.
# Other sensor data (cameras, IMU, Velodyne) are available via properties
# that create generators when accessed.
data = pykitti.raw(basedir, date, drive, frames=range(0, 50, 5))
# dataset.calib: Calibration data are accessible as a named tuple
# dataset.timestamps: Timestamps are parsed into a list of datetime objects
# dataset.oxts: Returns a generator that loads OXTS packets as named tuples
# dataset.camN: Returns a generator that loads individual images from camera N
# dataset.gray: Returns a generator that loads monochrome stereo pairs (cam0, cam1)
# dataset.rgb: Returns a generator that loads RGB stereo pairs (cam2, cam3)
# dataset.velo: Returns a generator that loads velodyne scans as [x,y,z,reflectance]
point_velo = np.array([0,0,0,1])
point_cam0 = data.calib.T_cam0_velo.dot(point_velo)
point_imu = np.array([0,0,0,1])
point_w = [o.T_w_imu.dot(point_imu) for o in data.oxts]
for cam0_image in data.cam0:
pass
rgb_iterator = data.rgb # Assign the generator so it doesn't
cam2_image, cam3_image = next(rgb_iterator)
这是原始.py包含在pykitti包中的文件
^{pr2}$