Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add timestamps - KITTI, Rosbag #120

Merged
merged 9 commits into from
Apr 5, 2023
6 changes: 5 additions & 1 deletion python/kiss_icp/datasets/kitti.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ def _lidar_pose_gt(poses_gt):
poses = poses.reshape((n, 4, 4)) # [N, 4, 4]
return _lidar_pose_gt(poses)

def get_frames_timestamps(file_path: str) -> np.ndarray:
timestamps = np.loadtxt(file_path).reshape(-1, 1)
return timestamps

@staticmethod
def read_calib_file(file_path: str) -> dict:
calib_dict = {}
Expand All @@ -101,4 +105,4 @@ def read_calib_file(file_path: str) -> dict:
# The format in KITTI's file is <key>: <f1> <f2> <f3> ...\n -> Remove the ':'
key = tokens[0][:-1]
calib_dict[key] = values
return calib_dict
nachovizzo marked this conversation as resolved.
Show resolved Hide resolved
return calib_dict