ROS in MATLAB
Access ROS networks and messages using 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.
|Create ROS messages|
|Retrieve information about ROS messages and message types|
|Display all ROS message contents|
|Retrieve information about ROS topics|
ROS Publisher and Subscriber
|Publish message on a topic|
|Subscribe to messages on a topic|
|Wait for new ROS message|
|Publish ROS message to topic|
|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
|Blank Message||Create blank message using specified message type|
|Current Time||Retrieve current ROS time or system time|
|Publish||Send messages to ROS network|
|Subscribe||Receive messages from ROS network|
|Call Service||Call service in ROS network|
ROS Publishers and Subscribers
- Work with Basic ROS Messages
Create, explore, and populate ROS messages in MATLAB, that are commonly encountered in robotics applications.
- Built-In Message Support
List of supported ROS message types in MATLAB.
- Exchange Data with ROS Publishers and Subscribers
Publish and subscribe to topics in a ROS network.
- Work with Specialized ROS Messages
Handle message types for laser scans, uncompressed and compressed images, point clouds, camera info, occcupancy grid, and octomap messages.
- Publish Variable-Length Nested ROS Messages and Deploy as ROS Node Using MATLAB
Work with complex ROS messages in MATLAB, such as messages with nested submessages and variable-length arrays.
- Improve Performance of ROS Using Message Structures
Demonstrates the use of ROS message structures, and their benefits and differences from message objects.
ROS Services And Actions
- Call and Provide ROS Services
Set up service servers to advertise a service to the ROS network.
- ROS Actions Overview
ROS action workflow and communication protocols
- Move a Turtlebot Robot Using ROS Actions
This example shows how to use the
/turtlebot_moveaction with a Turtlebot robot.