MCPcopy Create free account
hub / github.com/PRBonn/MapClosures / read_point_cloud

Method read_point_cloud

python/map_closures/datasets/mulran.py:46–52  ·  view source on GitHub ↗
(self, file_path: str)

Source from the content-addressed store, hash-verified

44 return self.read_point_cloud(self.scan_files[idx])
45
46 def read_point_cloud(self, file_path: str):
47 points = np.fromfile(file_path, dtype=np.float32).reshape((-1, 4))[:, :3]
48 timestamps = self.get_timestamps()
49 if points.shape[0] != timestamps.shape[0]:
50 # MuRan has some broken point clouds, just fallback to no timestamps
51 return points.astype(np.float64), np.array([])
52 return points.astype(np.float64), timestamps
53
54 @staticmethod
55 def get_timestamps():

Callers 1

__getitem__Method · 0.95

Calls 1

get_timestampsMethod · 0.95

Tested by

no test coverage detected