File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -48,14 +48,14 @@ def read_point_cloud(self, file_path: str):
4848 timestamps = self .get_timestamps ()
4949 if points .shape [0 ] != timestamps .shape [0 ]:
5050 # MuRan has some broken point clouds, just fallback to no timestamps
51- return points .astype (np .float64 ), np .ones ( points . shape [ 0 ])
51+ return points .astype (np .float64 ), np .array ([ ])
5252 return points .astype (np .float64 ), timestamps
5353
5454 @staticmethod
5555 def get_timestamps ():
5656 H = 64
5757 W = 1024
58- return ( np .floor (np .arange (H * W ) / H ) / W ). reshape ( - 1 , 1 )
58+ return np .floor (np .arange (H * W ) / H ) / W
5959
6060 def load_gt_poses (self , poses_file : str ):
6161 """MuRan has more poses than scans, therefore we need to match 1-1 timestamp with pose"""
Original file line number Diff line number Diff line change @@ -59,15 +59,15 @@ def getitem(self, scan_file: str):
5959 points = self .PyntCloud .from_file (scan_file ).points [["x" , "y" , "z" ]].to_numpy ()
6060 timestamps = self .get_timestamps ()
6161 if points .shape [0 ] != timestamps .shape [0 ]:
62- # MuRan has some broken point clouds, just fallback to no timestamps
63- return points .astype (np .float64 ), np .ones ( points . shape [ 0 ])
62+ # Newer College has some broken point clouds, just fallback to no timestamps
63+ return points .astype (np .float64 ), np .array ([ ])
6464 return points .astype (np .float64 ), timestamps
6565
6666 @staticmethod
6767 def get_timestamps ():
6868 H = 64
6969 W = 1024
70- return ( np .floor (np .arange (H * W ) / H ) / W ). reshape ( - 1 , 1 )
70+ return np .floor (np .arange (H * W ) / H ) / W
7171
7272 @staticmethod
7373 def get_pcd_filenames (scans_folder ):
You can’t perform that action at this time.
0 commit comments