Closed acseckin closed 7 years ago
I'm unable to reproduce this error. 'Tr' appears only in the calib.txt file associated with each sequence. Which sequence are you working with, is calib.txt in the default location, and does it contain a 'Tr' entry?
Closing due to inactivity.
For some reason the version that I downloaded does not have Tr in calib.txt in all sequences.
This is probably because the calib.txt in poses overwriting the correct calib.
Error after running demo_odometry.py
In google Colab, Python3, TPU , data_odometry_gray.zip
KeyError Traceback (most recent call last)
<ipython-input-16-16db14e38499> in <module>()
18 # Load the data. Optionally, specify the frame range to load.
19 # dataset = pykitti.odometry(basedir, sequence)
---> 20 dataset = pykitti.odometry(basedir, sequence, frames=range(0, 20, 5))
21
22 # dataset.calib: Calibration data are accessible as a named tuple
/usr/local/lib/python3.6/dist-packages/pykitti/odometry.py in __init__(self, base_path, sequence,
**kwargs)
31
32 # Pre-load data that isn't returned as a generator
---> 33 self._load_calib()
34 self._load_timestamps()
35 self._load_poses()
/usr/local/lib/python3.6/dist-packages/pykitti/odometry.py in _load_calib(self)
167
168 # Compute the velodyne to rectified camera coordinate transforms
--> 169 data['T_cam0_velo'] = np.reshape(filedata['Tr'], (3, 4))
170 data['T_cam0_velo'] = np.vstack([data['T_cam0_velo'], [0, 0, 0, 1]])
171 data['T_cam1_velo'] = T1.dot(data['T_cam0_velo'])
KeyError: 'Tr'
@leeclemnet
Solved with this file: http://www.cvlibs.net/download.php?file=data_odometry_calib.zip
After running demo_odometry.py code this error
My setup:
xubuntu: Ubuntu 16.04.2 LTS Editor: Spyder Python 2.7