Open
Description
Excuse me, the OpenPCDet tutorial I saw involves transforming both the point data and gt_boxes into a unified coordinate system [x-axis front, y-axis left, z-axis up] during the data loading process. However, I noticed that in the data loading and processing stages for the NuScenes and Waymo datasets, the point data is not transformed into this unified coordinate system, even though the LiDAR coordinate system differs from the unified coordinate system. Only the gt_boxes are transformed into the corresponding LiDAR coordinate system. I'd like to ask whether it is necessary to transform both the point data and gt_boxes into the unified coordinate system [x-axis front, y-axis left, z-axis up].
For nuscenes point cloud loading:
def __getitem__(self, index):
if self._merge_all_iters_to_one_epoch:
index = index % len(self.infos)
info = copy.deepcopy(self.infos[index])
points = self.get_lidar_with_sweeps(index, max_sweeps=self.dataset_cfg.MAX_SWEEPS)
def get_lidar_with_sweeps(self, index, max_sweeps=1):
info = self.infos[index]
lidar_path = self.root_path / info['lidar_path']
points = np.fromfile(str(lidar_path), dtype=np.float32, count=-1).reshape([-1, 5])[:, :4]
sweep_points_list = [points]
sweep_times_list = [np.zeros((points.shape[0], 1))]
for k in np.random.choice(len(info['sweeps']), max_sweeps - 1, replace=False):
points_sweep, times_sweep = self.get_sweep(info['sweeps'][k])
sweep_points_list.append(points_sweep)
sweep_times_list.append(times_sweep)
points = np.concatenate(sweep_points_list, axis=0)
times = np.concatenate(sweep_times_list, axis=0).astype(points.dtype)
points = np.concatenate((points, times), axis=1)
return points