Main Content

rosmsg

Retrieve information about ROS messages and message types

Description

rosmsg show msgtype returns the definition of the msgtype message.

rosmsg md5 msgtype returns the MD5 checksum of the msgtype message.

rosmsg list returns all available message types that you can use in MATLAB®.

msginfo = rosmsg("show", msgtype) returns the definition of the msgtype message as a character vector.

example

msgmd5 = rosmsg("md5", msgtype) returns the ‘MD5’ checksum of the msgtype message as a character vector.

example

msglist = rosmsg("list") returns a cell array containing all available message types that you can use in MATLAB.

Examples

collapse all

msgInfo = rosmsg('show','geometry_msgs/Point')
msgInfo = 
    '% This contains the position of a point in free space
     double X
     double Y
     double Z
     '

msgMd5 = rosmsg('md5','geometry_msgs/Point')
msgMd5 = 
'4a842b65f413084dc2b10fb484ea7f17'

Input Arguments

collapse all

ROS message type, specified as a character vector. msgType must be a valid ROS message type from ROS that MATLAB supports.

Example: "std_msgs/Int8"

Output Arguments

collapse all

Details of the information inside the ROS message definition, returned as a character vector.

MD5 checksum hash value, returned as a character vector. The MD5 output is a character vector representation of the 16-byte hash value that follows the MD5 standard.

List of all message types available in MATLAB, returned as a cell array of character vectors.

Version History

Introduced in R2019b