Skip to content

Commit

Permalink
Update odometry.py
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes-graeter authored Aug 25, 2017
1 parent 1819288 commit 3f4330b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pykitti/odometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ def poses(self):
# Read and parse the poses
try:
with open(pose_file, 'r') as f:
for line in f.readlines():
lines = f.readlines()
if self.frames is not None:
lines = [lines[i] for i in self.frames]

for line in lines:
T_w_cam0 = np.fromstring(line, dtype=float, sep=' ')
T_w_cam0 = T_w_cam0.reshape(3, 4)
T_w_cam0 = np.vstack((T_w_cam0, [0, 0, 0, 1]))
Expand Down

0 comments on commit 3f4330b

Please sign in to comment.