Skip to content

Use stepping field in message #1612

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 26, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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())
{
// 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