Page 1 of 1

Translate several pcd files

Posted: Fri Feb 12, 2021 12:26 pm
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!

Re: Translate several pcd files

Posted: Sat Feb 13, 2021 12:28 pm
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).

Re: Translate several pcd files

Posted: Sat Feb 20, 2021 9:18 am
by kate96
Thanks, Daniel! Really appreciate your help!