Main Content

Blank Message

Create blank ROS 2 message using specified message type

  • Library:
  • ROS Toolbox / ROS 2

  • Blank Message ROS 2 block

Description

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 and Call Service blocks.

Ports

Output

expand all

Blank ROS 2 message, returned as a non-virtual 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.

Data Types: bus

Parameters

expand all

Class of ROS 2 message, specified as Message, Service Request, or Service Response. For basic publishing and subscribing, use the Message class. To create a service request message for Call Service input, use the Service Request class.

ROS 2 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.

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).

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced in R2019b