Main Content

rosReadAllFieldNames

Get all available field names from ROS or ROS 2 point cloud message structure

Since R2021a

Description

names = rosReadAllFieldNames(pcloud) returns all the fields that are stored in the ROS or ROS 2 'sensor_msgs/PointCloud2' message structure, pcloud, and returns them in names.

Input Arguments

collapse all

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

Output Arguments

collapse all

List of field names in 'sensor_msgs/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

Version History

Introduced in R2021a