diff --git a/dataset/slam_dataset.py b/dataset/slam_dataset.py index 497ba6f..0971c93 100644 --- a/dataset/slam_dataset.py +++ b/dataset/slam_dataset.py @@ -993,14 +993,16 @@ def read_point_cloud( # print("available attributes:", keys) points = pc_load["positions"] + points = points.astype(dtype=np.float64) - if "t" in keys: - ts = pc_load["t"] * 1e-8 - elif "timestamp" in keys: - ts = pc_load["timestamp"] - else: - ts = None + time_fields = ["t", "ts", "time", "timestamp", "timestamps"] + ts = None + for time_field in time_fields: + if time_field in keys: + ts = pc_load[time_field] + break + if "colors" in keys and color_channel == 3: colors = pc_load["colors"] # if they are available points = np.hstack((points, colors)) @@ -1008,6 +1010,7 @@ def read_point_cloud( intensity = pc_load["intensity"] # if they are available # print(intensity) points = np.hstack((points, intensity)) + elif ".pcd" in filename: # currently cannot be readed by o3d.t.io pc_load = o3d.io.read_point_cloud(filename) points = np.asarray(pc_load.points, dtype=np.float64) diff --git a/utils/mesher.py b/utils/mesher.py index adb7187..fabe907 100644 --- a/utils/mesher.py +++ b/utils/mesher.py @@ -595,8 +595,8 @@ def recon_aabb_mesh( o3d.utility.Vector3iVector(faces), ) - if not self.silence: - print("Marching cubes done") + # if not self.silence: + # print("Marching cubes done") if estimate_sem: mesh = self.estimate_vertices_sem(mesh, verts, filter_free_space_vertices) diff --git a/vis_pin_map.py b/vis_pin_map.py index bbcdacf..a100d5e 100644 --- a/vis_pin_map.py +++ b/vis_pin_map.py @@ -47,7 +47,7 @@ def vis_pin_map(): sem_mlp = Decoder(config, config.sem_mlp_hidden_dim, config.sem_mlp_level, config.sem_class_count + 1) color_mlp = Decoder(config, config.color_mlp_hidden_dim, config.color_mlp_level, config.color_channel) - # initialize the feature octree + # initialize the neural point features neural_points = NeuralPoints(config) # Load the map