diff --git a/opencda/core/common/data_dumper.py b/opencda/core/common/data_dumper.py index 78b1b3b99..ec64d6cba 100644 --- a/opencda/core/common/data_dumper.py +++ b/opencda/core/common/data_dumper.py @@ -101,7 +101,7 @@ def run_step(self, return self.save_rgb_image(self.count) - # self.save_lidar_points() + self.save_lidar_points(self.count) self.save_yaml_file(perception_manager, localization_manager, behavior_agent, @@ -121,12 +121,12 @@ def save_rgb_image(self, count): cv2.imwrite(os.path.join(self.save_parent_folder, image_name), image) - def save_lidar_points(self): + def save_lidar_points(self, count): """ Save 3D lidar points to disk. """ point_cloud = self.lidar.data - frame = self.lidar.frame + frame = count point_xyz = point_cloud[:, :-1] point_intensity = point_cloud[:, -1] @@ -311,4 +311,4 @@ def matrix2list(matrix): """ assert len(matrix.shape) == 2 - return matrix.tolist() \ No newline at end of file + return matrix.tolist()