ROS Toolbox

Design, simulate, and deploy ROS-based applications


ROS Toolbox provides an interface connecting MATLAB® and Simulink® with the Robot Operating System (ROS and ROS 2), enabling you to create a network of ROS nodes. The toolbox includes MATLAB functions and Simulink blocks to import, analyze, and play back ROS data recorded in rosbag files. You can also connect to a live ROS network to access ROS messages.

The toolbox lets you verify ROS nodes via desktop simulation and by connecting to external robot simulators such as Gazebo. ROS Toolbox supports C++ code generation (with Simulink Coder™), enabling you to automatically generate ROS nodes from a Simulink model and deploy to simulated or physical hardware. Support for Simulink external mode lets you view messages and change parameters while your model is running on hardware.

Get Started:

ROS Network

Connect to ROS or ROS 2 to prototype autonomous systems applications. Access hardware or simulators over a ROS network.

ROS Network Connection

Connect to and explore ROS or ROS 2 networks. Use introspection to list available topics and types. View a detailed structure of ROS messages.

Connecting to a ROS network.

ROS Network Setup

Create and define your own ROS or ROS 2 network to communicate between different devices. Set up multiple ROS nodes to distribute tasks and information.

Example ROS 2 network. 

ROS Communication

Communicate with ROS nodes by passing messages.

Publishers and Subscribers

Send and receive ROS or ROS 2 messages using a topic with publish-subscribe semantics.

Simulink model for subscribing to sensor data and publishing wheel velocities.

Services and Actions

Use a client-server architecture to send requests, perform tasks, and get feedback in ROS applications.

Client-server interaction using ROS services and actions.

Parameter Server

Use ROS parameter servers to store configuration options for multiple nodes and enable the dynamic reconfiguration of nodes.

Simulink model that queries and sets ROS parameters to control vehicle gear selection. 

ROS Message

Work with messages to share information between ROS nodes. Use built-in messages or specify custom message definitions.

ROS Log Files (rosbags)

Import rosbag files to filter, visualize, and analyze logged data.

Workflow for ROS data selection from rosbag files.

Example of supported ROS messages.

Custom Messages

Add new message types for your ROS or ROS 2 applications using custom message support.

Generating ROS 2 custom messages.

ROS Deployment

Deploy standalone ROS and ROS 2 nodes to your network.

Generating a standalone ROS 2 node from Simulink. Explore gallery (6 images)

Application Examples

Use application examples to design, simulate, and deploy systems enabled by ROS and ROS 2 communication.

Latest Features

Network Connection and Exploration

Communicate with ROS and ROS 2 nodes in network with MATLAB and Simulink

Multiplatform Support

Access ROS functionality from Windows, macOS, and Linux

Publishers and Subscribers

Send and receive ROS and ROS 2 messages with MATLAB and Simulink via a ROS network

Custom Messages

Generate custom messages to use on both ROS and ROS 2 networks based on specified packages

Log File Playback

Import ROS log files (rosbags) to filter, visualize, and analyze logged data

Services and Actions

Use request-response communication or trigger tasks for more advanced workflows with ROS networks

Deployment of ROS Nodes

Deploy ROS and ROS 2 nodes to target hardware using Simulink Coder

Support Package for TurtleBot-Based Robots

Connect to TurtleBot hardware

See release notes for details on any of these features and corresponding functions.

Get a Free Trial

30 days of exploration at your fingertips.

Download now

Ready to Buy?

Get pricing information and explore related products.

Are You a Student?

Get MATLAB and Simulink student software.

Learn more