def oxts(self): """Generator to read OXTS data from file.""" # Find all the data files oxts_path = os.path.join(self.data_path, 'oxts', 'data', '*.txt') oxts_files = sorted(glob.glob(oxts_path)) # Subselect the chosen range of frames, if any if self.frames is not None: oxts_files = [oxts_files[i] for i in self.frames] # Return a generator yielding OXTS packets and poses return utils.get_oxts_packets_and_poses(oxts_files)
if os.path.isdir(f): continue else: bin_files.append(f) bin_files.sort() pose_files = [] if os.path.isdir(oxts_path): for f in os.listdir(oxts_path): if os.path.isdir(f): continue else: pose_files.append(oxts_path + "/" + f) pose_files.sort() poses = [] for pose in kitti.get_oxts_packets_and_poses(pose_files): poses.append(pose[1]) # print len(poses) img_files = [] if os.path.isdir(img_path): for f in os.listdir(img_path): if os.path.isdir(f): continue else: img_files.append(f) img_files.sort() if calib_imu_to_velo_file: calib = kitti.read_calib_file(calib_imu_to_velo_file)