(To be removed) Display all ROS message contents
Create Message and View Details
Create a message. Populate the message with data using the relevant properties.
msg = rosmessage('geometry_msgs/Point'); msg.X = 1; msg.Y = 2; msg.Z = 3;
View the message details.
X : 1 Y : 2 Z : 3
msg — ROS message
Message object handle
ROS message, specified as a
details — Details of ROS message
Details of a ROS message, returned as a character vector.
Version HistoryIntroduced in R2019b
R2021a: ROS Message Structure Functions
You can now create messages as structures with fields matching the message object properties. Using structures typically improves performance of creating, updating, and using ROS messages, but message fields are no longer validated when set. Message types and corresponding field values from the structures are validated when sent across the network.
To support message structures as inputs, new functions that operate on specialized ROS messages have been provided. These new functions are based on the existing object functions of message objects, but support ROS and ROS 2 message structures as inputs instead of message objects.
The object functions will be removed in a future release.
|Message Types||Object Function Name||New Function Name|