def _load_timestamps(self):
        """Load timestamps from file."""
        timestamp_file = os.path.join(
            self.data_path, 'oxts', 'timestamps.txt')

        # Read and parse the timestamps
        self.timestamps = []
        with open(timestamp_file, 'r') as f:
            for line in f.readlines():
                # NB: datetime only supports microseconds, but KITTI timestamps
                # give nanoseconds, so need to truncate last 4 characters to
                # get rid of \n (counts as 1) and extra 3 digits
                t = dt.datetime.strptime(line[:-4], '%Y-%m-%d %H:%M:%S.%f')
                self.timestamps.append(t)

        # Subselect the chosen range of frames, if any
        if self.frames is not None:
            self.timestamps = [self.timestamps[i] for i in self.frames]
def _load_timestamps ( self ) : timestamp_file = os . path . join ( self . data_path , 'oxts' , 'timestamps.txt' ) self . timestamps = [ ] with open ( timestamp_file , 'r' ) as f : for line in f . readlines ( ) : t = dt . datetime . strptime ( line [ : - 4 ] , '%Y-%m-%d %H:%M:%S.%f' ) self . timestamps . append ( t ) if self . frames is not None : self . timestamps = [ self . timestamps [ i ] for i in self . frames ]
Load timestamps from file.