ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Merge multiple pcd files.....

asked 2023-01-19 07:39:49 -0600

LEE gravatar image

Hi, I have to do the process of merging a large number of pcd files into one.

I have five folders. For example, when there is a folder called 1,2,3,4,5, I try to merge 1.pcd in folder1 and 1.pcd in folder2 and 1.pcd in folder3 and 1.pcd in folder4 and 1.pcd in folder5.

And there are about 3000 pcd files in each folder.

I think it will be difficult to merge one by one, so is there a tool that makes it easy?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2023-01-20 10:31:17 -0600

Ranjit Kathiriya gravatar image

Hello @LEE,

You can use open3D Library for that I think that is the best. You also can use a sample code snippet that is below,

import open3d as o3d 
import numpy as np

point_cloud = []
for i in glob.glob("dataset/3.6/*/*.pcd"):  # * means inner directory
    pcd =
    a = np.array(pcd.points)
edit flag offensive delete link more



OK I completly fix my problem! Thank You!!

LEE gravatar image LEE  ( 2023-01-22 00:17:58 -0600 )edit

answered 2023-01-20 07:15:42 -0600

Ifx13 gravatar image

I would suggest using the open3D python library, you can read pointclouds of many formats and then concatenate them in a "global" point cloud object which you can then export in the format you want.

I can't post an example right now because I'm on my smartphone but if you have trouble finding it out i will post an example later.

edit flag offensive delete link more


Okay, thanks. I haven't solved this problem in a few days, so I really want to solve it :)

LEE gravatar image LEE  ( 2023-01-20 07:22:48 -0600 )edit

Question Tools



Asked: 2023-01-19 07:39:49 -0600

Seen: 383 times

Last updated: Jan 20 '23