ROS in MATLAB
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
rospublisher. See Exchange Data with ROS Publishers and Subscribers for more
information on sending messages.
ROS services and actions enable users to perform tasks. Services use request-response communication to gather information and trigger callback functions in the ROS network. Actions can be used to trigger tasks or goals and receive feedback during operation of these tasks.
ROS Publisher and Subscriber
|Retrieve information about ROS actions|
|Create ROS Action Server|
|Create new action feedback message|
|Check if a goal has been preempted|
|Send feedback to action client during goal execution|
|Return function handle for ROS action server callback|
|Create ROS action client|
|Cancel all goals on action server|
|Cancel last goal sent by client|
|Send goal message to action server|
|Send goal message and wait for result|
|Wait for action server to start|
|Call ROS or ROS 2 service server and receive a response|
|Determine if ROS or ROS 2 service server is available|
|Retrieve information about services in ROS network|
|Connect to ROS service server|
|Create ROS service server|
|Wait for ROS or ROS 2 service server to start|
ROS Rate Control
ROS Publishers and Subscribers
- Work with Basic ROS Messages
Messages are the primary container for exchanging data in ROS.
- Built-In Message Support
List of supported ROS message types in MATLAB.
- Exchange Data with ROS Publishers and Subscribers
The primary mechanism for ROS nodes to exchange data is sending and receiving messages.
- 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.
- Publish Variable-Length Nested ROS Messages in MATLAB
This example shows how to work with complex ROS messages in MATLAB, such as messages with nested submessages and variable-length arrays.
- Improve Performance of ROS Using Message Structures
This example demonstrates the use of ROS message structures, and their benefits and differences from message objects.