Main Content

Gazebo Pacer

Settings for synchronized stepping between Gazebo and Simulink

Since R2019b

  • Gazebo Pacer block

Robotics System Toolbox / Gazebo Co-Simulation


The Gazebo Pacer block synchronizes the simulation times between Gazebo and Simulink®. Synchronization is important for ensuring your Simulink model and the Gazebo simulation behave correctly. The block outputs a Boolean indicating successful synchronization. Synchronized stepping is only supported for one Gazebo simulation. Your entire model, including referenced models, can only contain one Gazebo Pacer block.

To ensure successful synchronization, connect to a Gazebo simulation. Open the block mask and click Configure Gazebo network and simulation settings. For more information see Configure Gazebo Simulation.

Select the Reset behavior to reset the Gazebo simulation on model restart or only reset simulation time.

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.


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



expand all

Status of synchronization, output as either 0 or 1. A value of 0 indicates successful time syncing. A value of 1 means the simulations are out of sync.

Data Types: uint8


expand all

Select from the Reset behavior drop-down.

  • Reset Gazebo simulation time — Resets the Gazebo simulator time.

  • Reset Gazebo simulation time and scene — Resets both the Gazebo simulator time and scene.

Set the Sample time parameter to step the Gazebo simulation at the given rate. This parameter must be a multiple of the maximum step size of the Gazebo solver.

More About

expand all

Version History

Introduced in R2019b