Skip to content

Commit 0445515

Browse files
Changed timestamp format during KITTI conversion to include nanoseconds. Required for precise data-stamp associations
1 parent 987ae4c commit 0445515

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "vbr-devkit"
7-
version = "0.0.9"
7+
version = "0.1.0"
88
description = "Development kit for VBR SLAM dataset"
99
readme = "README.md"
1010
authors = [

python/vbr_devkit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.0.9"
1+
__version__ = "0.10.0"

python/vbr_devkit/datasets/kitti.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,9 @@ def _save_cloud(self, data: PointCloudXf, timestamp, *args, **kwargs):
8383
clip_points = np.stack([data.points["x"], data.points["y"], data.points["z"], data.points["intensity"]],
8484
axis=1)
8585
clip_points.tofile(dest_path)
86-
else:
87-
data.points.tofile(dest_path)
86+
return
87+
88+
data.points.tofile(dest_path)
8889

8990
def _save_image(self, data: Image, timestamp: float, *args, **kwargs):
9091
dest_path = self.data_f / Path(self.format_fn(self.metadata["num_messages"]) + ".png")
@@ -117,7 +118,7 @@ def close(self):
117118
json.dump(self.metadata, f)
118119
with self.timestamps_f.open("w") as f:
119120
f.writelines([
120-
str(datetime.fromtimestamp(float(t) / 1e9)) + "\n" for t in self.timestamps])
121+
str(np.datetime64(t, "ns")) + "\n" for t in self.timestamps])
121122

122123

123124
class KittiWriter:

0 commit comments

Comments
 (0)