diff --git a/pykitti/odometry.py b/pykitti/odometry.py index 33aca77..bb1f439 100644 --- a/pykitti/odometry.py +++ b/pykitti/odometry.py @@ -24,8 +24,8 @@ class odometry: def __init__(self, base_path, sequence, **kwargs): """Set the path.""" - self.sequence = sequence - self.sequence_path = os.path.join(base_path, 'sequences', sequence) + self.sequence = str(sequence).zfill(2) + self.sequence_path = os.path.join(base_path, 'sequences', self.sequence) self.pose_path = os.path.join(base_path, 'poses') self.frames = kwargs.get('frames', None) diff --git a/pykitti/raw.py b/pykitti/raw.py index edcb2ab..b3afdd3 100644 --- a/pykitti/raw.py +++ b/pykitti/raw.py @@ -19,6 +19,7 @@ class raw: def __init__(self, base_path, date, drive, **kwargs): """Set the path and pre-load calibration data and timestamps.""" self.dataset = kwargs.get('dataset', 'sync') + drive = str(drive).zfill(4) self.drive = date + '_drive_' + drive + '_' + self.dataset self.calib_path = os.path.join(base_path, date) self.data_path = os.path.join(base_path, date, self.drive) diff --git a/pykitti/tracking.py b/pykitti/tracking.py index 26ffc7d..493d7f1 100644 --- a/pykitti/tracking.py +++ b/pykitti/tracking.py @@ -9,7 +9,6 @@ import numpy as np import pykitti.utils as utils -import cv2 try: xrange @@ -26,7 +25,7 @@ class tracking: def __init__(self, base_path, sequence, **kwargs): """Set the path.""" self.base_path = base_path - self.sequence = sequence + self.sequence = str(sequence).zfill(4) self.frames = kwargs.get('frames', None) # Default image file extension is 'png'