Main Content

Gazebo Read

Receive messages from Gazebo server

  • Gazebo Read block

Libraries:
Robotics System Toolbox / Gazebo Co-Simulation

Description

The Gazebo Read block receives messages from the Gazebo server based on the topic and message type that the block specifies. The block outputs the latest message received as a bus signal, Msg, and a Boolean, IsNew, which indicates whether a message was received during the previous time step.

To receive messages from Gazebo server, connect to a Gazebo simulation. Open the block mask and click Configure Gazebo network and simulation settings. For more information see Configure Gazebo Simulation.

This block is part of a co-simulation interface between MATLAB® and Gazebo for exchanging data and sending commands. To see a basic example, check Perform Co-Simulation Between Simulink and Gazebo

Examples

Limitations

  • Models that use this block do not support Code Generation or Rapid Accelerator mode.

Ports

Output

expand all

Status of the message received, output as a Boolean, which indicates whether the block output Msg was received in the previous time step.

Data Types: Boolean

Gazebo message, output as a bus signal, with elements relevant to the specific Topic and Message type.

The Msg output always outputs the most recent message received.

Data Types: bus

Parameters

expand all

To get a topic from an existing Gazebo simulation, select From Gazebo. Click the Select button to see a list of available topics. To connect to a Gazebo simulation, click Configure Gazebo network and simulation settings in the block mask.

To enter a custom topic without an active Gazebo connection, select Specify your own. Use the Topic parameter to type the name of the message.

Topic name of message, specified as a string.

To get a topic from an existing Gazebo simulation, select From Gazebo. Click the Select button to see a list of available topics. To connect to a Gazebo simulation, click Configure Gazebo network and simulation settings in the block mask.

To specify a topic without connecting, select Specify your own.

Click Select to get a list of message types available in Gazebo. If you choose your Topic from a connected Gazebo simulation, this parameter is set automatically.

Sample time indicates when, during simulation, the block produces outputs and if appropriate, updates its internal state.

Select Make Joint Axis Related Bus Signal to Fixed Dimensions to convert the joint-axis-related bus signal from variable dimension to fixed dimension. Then specify the number of joint axis.

Dependencies

To enable this parameter, set Message type to gazebo_msgs/JointState and select the Make Joint Axis Related Bus Signal to Fixed Dimensions check box.

More About

expand all

Version History

Introduced in R2019b