ROS 2 Node Generation and Deployment
ROS Toolbox enables you to generate C++ and CUDA® code for ROS 2 nodes, and deploy them to local or remote device targets. For MATLAB® code that contains ROS 2 interfaces, you can generate C++ code and deploy them as ROS 2 nodes using MATLAB Coder™. For Simulink® models, you can generate C++ code using Simulink Coder. You can also generate optimized CUDA code using GPU Coder™, and deploy them as ROS 2 nodes.
This table illustrates the type of ROS 2 nodes you can generate and deploy from MATLAB and Simulink with a reference example for each supported workflow:
ROS 2 Node Type | Deployment from MATLAB | Deployment from Simulink |
---|---|---|
Standard Node | Generate Standalone ROS 2 Node from MATLAB Function | Generate Standalone ROS 2 Node from Simulink |
Component Node | Not Supported | Generate a ROS 2 Component Node from Simulink |
ros2_Control Plugin | Not Supported | Generate ros2_control Plugin from Simulink |
CUDA optimized Node | Generate CUDA ROS and CUDA ROS 2 Nodes Using MATLAB Coder and GPU Coder | Generate CUDA ROS 2 Node from Simulink |
For more information about generating and deploying the different types of ROS 2 nodes, see the categories below.
Note
Deployment of ROS 2 nodes requires transfer of files to the target ROS 2 device through an SSH connection. Ensure that OpenSSH is installed on the target ROS 2 device before deployment.
Categories
- ROS 2 Standard Node Generation and Deployment
Generate C/C++ and CUDA code for ROS 2 standard nodes and deploy to local and remote hardware
- ROS 2 Component Node Generation and Deployment
Generate C/C++ and CUDA code for ROS 2 component nodes and deploy to local and remote hardware
- ROS 2 Control Plugin Generation and Deployment
Generate C/C++ and CUDA code for ros2_control plugin, and deploy to local and remote hardware