Translate several pcd files

Feel free to ask any question here
Post Reply
kate96
Posts: 2
Joined: Fri Feb 12, 2021 12:04 pm

Translate several pcd files

Post by kate96 »

Hi guys!!

Really sorry if this question is already on the board, i could not find an answer for this in days.

I am currently trying to convert my bag files from an Ouster sensor (os-0-128) to .las files.
By using pcl_ros bag_to_pcd i managed to get ±800 pcd files from single .bag file (duration of record = 90sec). The next step was to use PDAL pcd to las, but it did not work out. The PCD reader does not handle binary well (which is represented by _ in the header).
So i found a terminal command here: https://github.com/PDAL/PDAL/issues/3254

Code: Select all

cloudcompare.CloudCompare -SILENT -O a.pcd -C_EXPORT_FMT ASC -ADD_HEADER -SAVE_CLOUDS FILE "a.asc"
It worked perfectly fine for me. I translated pcd to ascii (.asc) and then to .las with CloudCompare. Thank you for this software!!

So my question is: can i translate whole directory of pcd files with this kind of tool? If yes, would you please tell me how?

Big thanks in advance!
daniel
Site Admin
Posts: 7385
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Translate several pcd files

Post by daniel »

Well you can simply create a script that process each file one by one? (there are some examples on this forum, but it mainly depend on your batch environment I guess).
Daniel, CloudCompare admin
kate96
Posts: 2
Joined: Fri Feb 12, 2021 12:04 pm

Re: Translate several pcd files

Post by kate96 »

Thanks, Daniel! Really appreciate your help!
Post Reply