MATLAB® Coder™ generates standalone C/C++ code from Robotics System Toolbox™ functions and classes that have been enabled to support code generation. Using the toolbox with MATLAB Coder, you can generate ANSI-compliant C code or MEX functions.
Also, you can generate C++ code for a standalone ROS node from a Simulink® model. You can then transfer and run the generated C++ code in a Linux ROS environment, which is built and run independent of Simulink. See Generate a Standalone ROS Node from Simulink® for an example generating a standalone ROS node.
To view a full list of code generation support, see Code Generation Support, Usage Notes and Limitations. You can also view the Extended Capabilities section on any reference page.
This example shows you how to generate and build a standalone ROS node from a Simulink model.
You can generate code for select Robotics System Toolbox algorithms to speed up their execution.
This example shows you how to generate C++ code from a Simulink model to deploy as a standalone ROS node.
External mode enables Simulink on your host computer to communicate with a deployed model on your robotics hardware during runtime.
External mode enables Simulink models on your host computer to communicate with a deployed model on your robot hardware during runtime.
Several Robotics System Toolbox functions are enabled to generate C/C++ code.
To generate code from MATLAB code that contains Robotics System Toolbox functions, classes, or System objects, you must have the MATLAB Coder software.