rosgenmsg
Generate custom messages from ROS definitions
Description
rosgenmsg(
generates ROS custom messages
in MATLAB® by reading ROS custom messages, service definitions, and action
definitions in the specified folder path. The function expects one or more ROS
package folders inside the folder path. These packages contain the message
definitions in folderpath
).msg
files, the service definitions in
.srv
files, and the action definitions in
.action
files.
After calling this function, you can send and receive your custom messages in MATLAB like all other supported messages. You can create these messages
using rosmessage
or view the list of
messages by calling rosmsg list
.
Note
When generating custom messages for ROS, you must build the ROS packages. This requires you to have CMake and a C++ compiler for your platform. For more information, see ROS System Requirements
The custom messages from the ROS definitions have to be regenerated for every new release.
rosgenmsg(
specifies additional options using one or more name-value pair arguments.folderpath
,Name,Value
)
Examples
Input Arguments
Limitations
ROS custom messages and the
rosgenmsg
function are not supported with MATLAB Compiler™.