Since R2020b, the ROS Toolbox supports the ROS Melodic Morenia distribution for ROS.
Windows® — Windows 10 recommended.
Linux® — Ubuntu 18.04 recommended.
Mac OS X
For more information about ROS Melodic support, see their Target Platforms page.
To connect to ROS networks with the rosinit
function, you must install and setup Python 2.7.
To check your Python® version, use the pyenv
function.
pyenv
ans = PythonEnvironment with properties: Version: "2.7" Executable: "C:\Python27\pythonw.exe" Library: "C:\windows\system32\python27.dll" Home: "C:\Python27" Status: NotLoaded ExecutionMode: OutOfProcess
If your Python interpreter is set to a different version, restart MATLAB® and set the version with pyenv
.
pyenv('Version','2.7')
When generating custom messages for ROS, you must build the ROS packages. This requires you to have Python, CMake, and a C++ compiler for your platform:
Download and install CMake 3.15.5+.
C++ Compilers
Windows— Visual Studio 2017
Linux— GNU Compiler Collection (GCC) 6.3+
macOS — Xcode 10+
Since R2020a, the ROS Toolbox supports the Dashing Diademata distribution for ROS 2.
Platforms
Windows 10 only
Linux — Ubuntu 18.04 recommended
macOS — Sierra (10.12.x)
For more information about ROS Dashing support, see their Dashing Diademata page.
When generating custom messages for ROS 2, you must build the ROS packages. This requires you to have Python, CMake, and a C++ compiler for your platform.
Install and setup Python 3.7.
To check your Python version, use the pyenv
function.
pyenv
ans = PythonEnvironment with properties: Version: "3.7" Executable: "C:\Python37\pythonw.exe" Library: "C:\windows\system32\python37.dll" Home: "C:\Python37" Status: NotLoaded ExecutionMode: OutOfProcess
If your Python interpreter is set to a different version, restart MATLAB and set the install version with pyenv
.
pyenv('Version','3.7')
Download and install CMake 3.15.5+.
Windows— Visual Studio 2017
Linux— GNU Compiler Collection (GCC) 6.3+
macOS — Xcode 10+