Main Content


Get all available field names from ROS point cloud


names = readAllFieldNames(pcloud) returns all the fields that are stored in the PointCloud2 ROS message, pcloud, and returns them in names.

Input Arguments

collapse all

Point cloud, specified as a PointCloud2 message structure for a 'sensor_msgs/PointCloud2' ROS or ROS 2 message.

Output Arguments

collapse all

List of field names in PointCloud2 message, returned as a cell array of character vectors. If no fields exist in the message, fieldname returns an empty cell array.

Extended Capabilities

Introduced in R2021a