utiasSTARS / pykitti

Python tools for working with KITTI data.
MIT License
1.15k stars 239 forks source link

Can't use the "dataset.get_velo(idx)" method from pykitti #29

Closed liemwellys closed 5 years ago

liemwellys commented 6 years ago

Hi, How do you set up the folder for dataset downloaded from KITTI website? Because when I try to load the velodyne point using method dataset.get_velo(0), it has error:

Traceback (most recent call last): File "D:/Documents/Python Projects/kitti velodyne/kitti5.py", line 26, in print(data.get_cam0(0)) File "C:\Users\Welly\Anaconda3\envs\py36\lib\site-packages\pykitti\raw.py", line 48, in get_cam0 return utils.load_image(self.cam0_files[idx], mode='L') IndexError: list index out of range

my configuration is like this: basedir = 'data' date = '2011_09_26' drive = '0005'

leeclemnet commented 6 years ago

The KITTI dataset IJRR paper has details on the file structure. When you unzip the data files, it should already be set up properly.

Have you tried changing your basedir to an absolute path?

canorbal commented 6 years ago

@leeclemnet could you please explain what you mean by set up properly? I've downloaded data_odometry_color.zip, data_odometry_poses.zip, data_odometry_calib.zip and devkit_odometry.zip. After that I've unzipped everything but got the same error

thx for any help!

leeclemnet commented 6 years ago

@canorbal When you unzip the files they should all merge into a single directory structure laid out as specified in the paper linked in https://github.com/utiasSTARS/pykitti/issues/29#issuecomment-409591661. As long as your basedir is pointed to this folder, you shouldn't encounter any problems. You may have to use an absolute path for the basedir.