Skip to content

Commit

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

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

* deprecated

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

Co-authored-by: Nate Koenig <nate@openrobotics.org>
  • Loading branch information
nkoenig and Nate Koenig authored Jul 26, 2022
1 parent 8a651db commit eabad2d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ release will remove the deprecated code.
* The shared libraries have `gz` where there used to be `ignition`.
* Using the un-migrated version is still possible due to tick-tocks, but will be removed in future versions.

* The WorldStatistics message published on the 'stats' topic now has
a `stepping` field that should be used in place the 'step' field in the
message's header.

* **Breaking Changes**
* The project name has been changed to use the `gz-` prefix, you **must** use the `gz` prefix!
* This also means that any generated code that use the project name (e.g. CMake variables, in-source macros) would have to be migrated.
Expand Down
3 changes: 3 additions & 0 deletions src/SimulationRunner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,11 @@ void SimulationRunner::PublishStats()

if (this->Stepping())
{
// (deprecated) Remove this header in Gazebo H
auto headerData = msg.mutable_header()->add_data();
headerData->set_key("step");

msg.set_stepping(true);
}

// Publish the stats message. The stats message is throttled.
Expand Down

0 comments on commit eabad2d

Please sign in to comment.