Create blank message using specified message type
ROS Toolbox / ROS
The Blank Message block creates a Simulink® nonvirtual bus corresponding to the selected ROS message type. The block creates ROS message buses that work with Publish, Subscribe, or Call Service blocks. On each sample hit, the block outputs a blank or “zero” signal for the designated message type. All elements of the bus are initialized to 0. The lengths of the variable-length arrays are also initialized to 0.
Before R2016b, models using
ROS message types with certain reserved property names could not generate code. In
2016b, this limitation has been removed. The property names are now appended with an
Vector3Stamped_). If you use models created with a
pre-R2016b release, update the ROS message types using the new names with an underscore.
Redefine custom maximum sizes for variable length arrays.
The affected message types are:
Msg— Blank ROS message
Blank ROS message, returned as a nonvirtual bus. To specify the type of ROS message, use the Message type parameter. All elements of the bus are initialized to 0. The lengths of the variable-length arrays are also initialized to 0.
Class— Class of ROS message
Class of ROS message, specified as
Service Request, or
Response. For basic publishing and subscribing, use the
Type— ROS message type
'geometry_msgs/Point'(default) | character vector | dialog box selection
ROS message type, specified as a character vector or a dialog box selection. Use Select to select from a list of supported ROS messages. The list of messages given depends on the Class of message you select.
Sample time— Interval between outputs
Inf(default) | numeric scalar
Interval between outputs, specified as a numeric scalar. The default value indicates that the block output never changes. Using this value speeds simulation and code generation by eliminating the need to recompute the block output. Otherwise, the block outputs a new blank message at each interval of Sample time.
For more information, see Specify Sample Time (Simulink).