Main Content

ROS Toolbox System Requirements

ROS or ROS 2 Node Deployment and Custom Messages

To generate custom messages for ROS or ROS 2, or deploy ROS or ROS 2 nodes from MATLAB® or Simulink® software, you must build the necessary ROS or ROS 2 packages. To build these packages, you must have Python® software, CMake software, and a C++ compiler for your platform. To generate and deploy ROS or ROS 2 nodes from MATLAB or Simulink, you must also have a MATLAB Coder™ or Simulink Coder license respectively. To generate and deploy CUDA® optimized ROS or ROS 2, you must have a GPU Coder™ license.

Note

The nodes in MATLAB and Simulink software can communicate with ROS or ROS 2 nodes in ROS or ROS 2 distributions that are not supported in MATLAB and Simulink, only if the message definitions are the same.

Configure Python Environment

To connect to ROS networks with the rosinit function, you must install and set up the required version of Python.

To install Python on a Linux® Ubuntu® machine, use this command with the required Python version for the specific Ubuntu release.

sudo apt install python3.9 python3.9-venv python3.9-dev

The above example installs Python 3.9 on a Linux Ubuntu machine.

After you install and setup the required version of Python, follow these steps to configure it for use with ROS Toolbox.

Starting in R2022b

  • On the Home tab in the Environment section of the MATLAB toolstrip, click Preferences.

  • Select ROS Toolbox, click the Open ROS Toolbox Preferences button, and specify the path to the Python executable that you installed in the previous step.

  • Click Recreate Python Environment.

    Default view of ROS Toolbox Preferences dialog box. Browse to navigate to the parent directory of python executable. Click Recreate Python Environment.

Prior to R2022b

  • To check your Python version, use the pyenv function. For example,

    pyenv
    ans = 
      PythonEnvironment with properties:
    
              Version: "3.9"
           Executable: "C:\Python39\python.exe"
              Library: "C:\Python39\python39.dll"
                 Home: "C:\Python39"
               Status: NotLoaded
        ExecutionMode: InProcess
  • If your Python interpreter is set to a different version, restart MATLAB and set the version with pyenv.

    pyenv(Version="3.9")

MATLAB R2023a

ROS Toolbox in R2023a supports the Noetic Ninjemys distribution for ROS and the Foxy Fitzroy distribution for ROS 2.

ROS and ROS 2 System Requirements

PlatformPlatform VersionsPython VersionC++ CompilersCMake
Windows®Windows 10 (recommended)3.8 and 3.9Visual Studio 2019 (recommended) and 2022

For R2023a, manual installation of CMake is not required.

Linux

Ubuntu 20.04 Focal Fossa (recommended)

Debian® 11 Bullseye

GNU Compiler Collection (GCC) 6.3+
macOS

Mojave 10.14

Catalina 10.15

Big Sur 11

Monterey 12.0.1 (recommended)

Xcode 10+

MATLAB R2022b

ROS Toolbox in R2022b supports the Noetic Ninjemys distribution for ROS and the Foxy Fitzroy distribution for ROS 2.

ROS and ROS 2 System Requirements

PlatformPlatform VersionsPython VersionC++ CompilersCMake
WindowsWindows 10 (recommended)3.9Visual Studio 2019 (recommended) and 2022

For R2022b, manual installation of CMake is not required.

Linux

Ubuntu 20.04 Focal Fossa (recommended)

Debian 11 Bullseye

GNU Compiler Collection (GCC) 6.3+
macOS

Mojave 10.14

Catalina 10.15

Big Sur 11

Monterey 12.0.1 (recommended)

Xcode 10+

MATLAB R2022a

Since R2022a, ROS Toolbox supports the Noetic Ninjemys distribution for ROS and the Foxy Fitzroy distribution for ROS 2.

ROS and ROS 2 System Requirements

PlatformPlatform VersionsPython VersionC++ CompilersCMake
WindowsWindows 10 (recommended)3.9Visual Studio 2017 and 2019 (recommended)

For R2022a, download and install CMake 3.16.3+.

Linux

Ubuntu 20.04 Focal Fossa (recommended)

Debian 11 Bullseye

GNU Compiler Collection (GCC) 6.3+
macOS

Mojave 10.14

Catalina 10.15

Big Sur 11

Monterey 12.0.1 (recommended)

Xcode 10+

MATLAB R2020b to R2021b

From R2020b to R2021b, ROS Toolbox supports the Melodic Morenia distribution for ROS.

ROS System Requirements

PlatformPlatform VersionsPython VersionC++ CompilersCMake
WindowsWindows 102.7Visual Studio 2017 and 2019 (recommended)CMake 3.15.5+
Linux

Ubuntu 18.04 Bionic Beaver (recommended)

GNU Compiler Collection (GCC) 6.3+
macOSMac OS XXcode 10+

From R2020b to R2021b, the ROS Toolbox supports the Dashing Diademata distribution for ROS 2.

ROS 2 System Requirements

PlatformPlatform VersionsPython VersionC++ CompilersCMake
WindowsWindows 103.7Visual Studio 2017CMake 3.15.5+
Linux

Ubuntu 18.04 Bionic Beaver (recommended)

GNU Compiler Collection (GCC) 6.3+
macOSSierra 10.12.xXcode 10+

Supported ROS Distributions for Past Releases

From R2016b to R2020a, ROS Toolbox supported the Indigo Igloo distribution.

Supported ROS 2 Distributions for Past Releases

From R2019b to R2020a, ROS Toolbox supported the Bouncy Bolson distribution.

Related Topics