Loading and saving point clouds to the disk

PCL provides a standard file format to load and store point clouds to the disk as it is a common practice among researchers to share interesting datasets for other people to experiment with. This format is named PCD, and it has been designed to support PCL-specific extensions.

The format is very simple; it starts with a header containing information about the point type and the number of elements in the point cloud, followed by a list of points conforming to the specified type. The following lines are an example of a PCD file header:

# .PCD v.5 - Point Cloud Data file format FIELDS x y z intensity distance sid SIZE 4 4 4 4 4 4 TYPE F F F F F F COUNT 1 1 1 1 1 1 WIDTH 460400 HEIGHT 1 POINTS 460400 ...

Get ROS Programming: Building Powerful Robots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.