Query regarding pcd data format

Hi team,

I am usingPDAL library to parse the nuscenes lidar dataset. I believe that pcd data file provided are in binary format but the header is missing because of which parsing library such as PDAL is not able to parse it.

Also the file extension is pcd.bin. Is that the standard file extension for pcd binary format ? As the libraries that I am using expects .pcd extension. Please let me know what is the format that you are using and how can we generate header for each file ?


Hi. The radar files (.pcd) follow the ASCII PCD standard. The lidar files (.pcd.bin) are our own invention. They are simply numpy arrays which can be loaded like this: https://github.com/nutonomy/nuscenes-devkit/blob/master/python-sdk/nuscenes/utils/data_classes.py#L254

The background is that loading this binary data is much faster.


In case I am using PDAL library to perform transformation on data, do you know how can we generate header for pcd files ?

Shilpa Chaturvedi

Just copy and modify the example from https://github.com/nutonomy/nuscenes-devkit/blob/master/python-sdk/nuscenes/utils/data_classes.py#L311
FIELD x y z intensity ring_index
SIZE 4 4 4 4 4
COUNT 1 1 1 1 1

Note that I don’t know whether the data is stored in the correct format for pcd. It may be easier to read it with numpy and write it to a file as ASCII characters (rather than binary).

Thanks for the reply !