You can create your own ROS custom messages and use them in MATLAB® and Simulink® with ROS networks to transmit information. For ROS custom messages,
use rosAddons
to install the necessary addon and use the
rosgenmsg
function. To learn the
requirements for generating custom messages, see ROS Custom Message Support.
For ROS 2, use ros2genmsg
with your custom message packages.
rosgenmsg | Generate custom messages from ROS definitions |
ros2genmsg | Generate custom messages from ROS 2 definitions |
rosAddons | Install add-ons for ROS |
How to install ROS Toolbox add-ons.
Description of ROS custom message structure and how to create them.
Create Custom Messages from ROS Package
This example shows the procedure for creating a ROS custom message in MATLAB
Custom messages are user-defined messages that you can use to extend the set of message types currently supported in ROS 2.