Skip to content

Commit

Permalink
fix: convert cloud_path from Path to str
Browse files Browse the repository at this point in the history
  • Loading branch information
YifuTao committed Sep 18, 2024
1 parent 19f6630 commit b12f867
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions oxford_spires_utils/point_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ def merge_downsample_clouds(cloud_path_list, output_cloud_path, downsample_voxel
print("Merging clouds ...")
final_cloud = o3d.geometry.PointCloud()
for cloud_path in tqdm(cloud_path_list):
cloud_path = str(cloud_path)
if cloud_path.endswith(".pcd"):
cloud = read_pcd_with_viewpoint(str(cloud_path))
cloud = read_pcd_with_viewpoint(cloud_path)
elif cloud_path.endswith(".ply"):
cloud = o3d.io.read_point_cloud(str(cloud_path))
cloud = o3d.io.read_point_cloud(cloud_path)
else:
raise ValueError(f"Unsupported file format: {cloud_path}")
final_cloud += cloud
Expand Down

0 comments on commit b12f867

Please sign in to comment.