This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Publishers and Subscribers

Create, send, and receive messages, topics, and network information

ROS shares information using messages. Messages are a simple data structure for sharing data. To receive, or subscribe to, a message, use rossubscriber. To send, or publish, a message use rospublisher to send a message. See Exchange Data with ROS Publishers and Subscribers for more information on sending messages.

Functions

rosmessageCreate ROS messages
rosmsgRetrieve information about ROS messages and message types
definitionRetrieve definition of ROS message type
showdetailsDisplay all ROS message contents
rospublisher Publish message on a topic
rossubscriber Subscribe to messages on a topic
rostopicRetrieve information about ROS topics
receiveWait for new ROS message
sendPublish ROS message to topic
robotics.RateExecute loop at fixed frequency
rosrateExecute loop at fixed frequency

Topics

Work with Basic ROS Messages

Messages are the primary container for exchanging data in ROS.

Built-In Message Support

List of supported message types in MATLAB® ROS.

Work with Specialized ROS Messages

Some commonly used ROS messages store data in a format that requires some transformation before it can be used for further processing.

Exchange Data with ROS Publishers and Subscribers

The primary mechanism for ROS nodes to exchange data is to send and receive messages.