PointCloud2
(To be removed) Access point cloud messages
PointCloud2 object will be removed in a future release. Use message structure format
when you create ROS messages using the rosmessage function, by specifying the Dataformat
name-value argument as "struct". You can use rosReadXYZ, rosWriteXYZ,
rosReadRGB, and rosWriteRGB
functions to work with point cloud messages. For more information, see ROS Message Structure Functions.
Description
The PointCloud2 object is an implementation of the
sensor_msgs/PointCloud2 message type in ROS. The object contains
meta-information about the message and the point cloud data. To access the actual data,
use readXYZ to
get the point coordinates and readRGB to
get the color information, if available.
Creation
Description
ptcloud = rosmessage('sensor_msgs/PointCloud2')
creates an empty PointCloud2 object. To specify point
cloud data, use the ptcloud.Data property. You can also
get point cloud data messages off the ROS network using rossubscriber.
Properties
Object Functions
readAllFieldNames | (To be removed) Get all available field names from ROS point cloud |
readField | (To be removed) Read point cloud data based on field name |
readRGB | (To be removed) Extract RGB values from point cloud data |
readXYZ | (To be removed) Extract XYZ coordinates from point cloud data |
scatter3 | Display point cloud in scatter plot |
showdetails | (To be removed) Display all ROS message contents |
Examples
Version History
Introduced in R2019bSee Also
rosReadAllFieldNames | rosReadField | rosReadRGB | rosReadXYZ | scatter3 | rosShowDetails | rosmessage | rossubscriber
