Main Content

ROS Simulink Support and Limitations

The ROS Toolbox does not support the following ROS features in Simulink®:

  • ROS Service Servers

  • ROS Actions

If your application requires these features, consider using MATLAB® ROS functionality. You can write a ROS node using MATLAB that can publish services, actions, and transformation trees to a topic as ROS messages. Simulink can then subscribe to that topic to work with those messages. The following functions are used in MATLAB to work with these features:

For ROS 2, Simulink only supports:

To see a full list of ROS support in Simulink, see ROS Network Access in Simulink.

ROS Model Reference

Simulink supports model reference when using ROS blocks with some limitations.

  • Multiple references to the same model results in an error due to duplicate buses with the same name being created for ROS messages used by the ROS blocks. You can only reference a model once in a parent model.

  • Referenced data dictionaries are not supported with variable-size ROS messages.

  • Simulation Mode only supports Normal mode.

Remote Desktop

Running ROS networks from remote desktop applications can cause ROS communication to be interrupted. Consider executing your network without a remote connection.

ROS 2 Model Build Failure

A space in the installation path of Python 3.9 causes an error related to the creation of a Python virtual environment when generating code from a ROS 2 Simulink model. e.g. C:\Program Files\Python39\python.exe

Related Topics