Skip to content

Commit

Permalink
Use stepping field in message (#441)
Browse files Browse the repository at this point in the history
* Use stepping field in message

Signed-off-by: Nate Koenig <nate@openrobotics.org>

* Missing parens

Signed-off-by: Nate Koenig <nate@openrobotics.org>

Co-authored-by: Nate Koenig <nate@openrobotics.org>
  • Loading branch information
nkoenig and Nate Koenig committed Jul 27, 2022
1 parent b53e233 commit 457e4d7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins/world_control/WorldControl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,12 @@ void WorldControl::ProcessMsg()

// ignore the message if it's associated with a step
const auto &header = this->dataPtr->msg.header();
if ((header.data_size() > 0) && (header.data(0).key() == "step"))
if (this->dataPtr->msg.stepping() ||
// (deprecated) Remove this check in Gazebo H
((header.data_size() > 0) && (header.data(0).key() == "step")))
{
return;
}

// If the pause state of the message doesn't match the pause state of this
// plugin, then play/pause must have occurred elsewhere (for example, the
Expand Down

0 comments on commit 457e4d7

Please sign in to comment.