Robot Operating System (ROS) Support from ROS Toolbox

Create ROS nodes in MATLAB and Simulink, exchange messages with other nodes on the ROS and ROS 2 network, import ROS log (rosbag) files into MATLAB and Simulink, and generate C++ code for a standalone ROS node.

Capabilities and Features

ROS Toolbox provides an interface between MATLAB® and Simulink® and the Robot Operating System (ROS) that enables you to communicate with a ROS and ROS 2 network, interactively explore robot capabilities, and visualize sensor data. You can develop, test, and verify your robotics algorithms and applications on ROS-enabled robots and robot simulators such as Gazebo. You can also create a self-contained ROS network directly in MATLAB and Simulink, and import ROS log files (rosbags) to visualize, analyze, and post-process logged data. For example, you can read a batch of images for labeling and training a neural network. These features allow you to develop your robotics algorithms in MATLAB and Simulink, while giving you the ability to exchange messages with other nodes on the ROS network. The toolbox also supports a large set of existing message types. Using the ROS custom messages generation function, you can extend this set to include custom message types. You can define your own custom ROS and ROS 2 message and service types, and use them in MATLAB and Simulink to communicate with other nodes in the ROS network. You can share generated custom message interfaces with other MATLAB users. With Simulink Coder®, you can generate C++ code from a Simulink model for a standalone ROS application that can run on any Linux® platform such as Raspberry Pi that has ROS installed.

Key features allow you to:

  • Communicate with a ROS network, interactively explore robot capabilities, and visualize sensor data
  • Create ROS nodes, publishers, and subscribers directly from MATLAB and Simulink
  • Create and send ROS messages from MATLAB and Simulink
  • Create and send ROS Custom Messages from MATLAB and Simulink
  • Call and provide ROS services
  • Import ROS log files (rosbags) to visualize, analyze, and post-process logged data
  • Use ROS functionality on any platform (Windows®, Linux, Mac)
  • Use MATLAB as an ROS master
  • Test and verify applications on ROS-enabled robots and robot simulators such as Gazebo and V-REP
  • Create Simulink models that work with a ROS network
  • Generate a standalone ROS C++ node from a Simulink model

About Robot Operating System (ROS)

The Robot Operating System (ROS) is an open-source, meta-operating system that allows different components of robotics systems to exchange information in the form of messages. A component sends a message by publishing it to a particular topic such as "/odometry". Other components receive the message by subscribing to that topic. The services provided by ROS include hardware abstraction, implementation of commonly used functionality, visualization, low-level device control, message passing between processes, and package management.

Explore gallery (5 images)