Create ROS 2 message structures
msg = ros2message(msgType)
example
msg = ros2message(msgType) creates a structure compatible with ROS 2 messages of type msgType.
msg
msgType
collapse all
Create a ROS 2 string message.
strMsg = ros2message('std_msgs/String')
strMsg = struct with fields: data: ''
Create an empty ROS 2 laser scan message.
scanMsg = ros2message("sensor_msgs/LaserScan")
scanMsg = struct with fields: header: [1x1 struct] angle_min: 0 angle_max: 0 angle_increment: 0 time_increment: 0 scan_time: 0 range_min: 0 range_max: 0 ranges: 0 intensities: 0
Message type for a ROS 2 topic, specified as a character vector.
ROS 2 message for a given topic, returned as an object handle.
ros2 | ros2node | ros2publisher | ros2subscriber
ros2
ros2node
ros2publisher
ros2subscriber
You have a modified version of this example. Do you want to open this example with your edits?