Skip to content
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

Restore log playback #2590

Closed
wants to merge 3 commits into from
Closed

Restore log playback #2590

wants to merge 3 commits into from

Conversation

arjo129
Copy link
Contributor

@arjo129 arjo129 commented Sep 4, 2024

🦟 Bug fix

Summary

Fixes gazebosim/gazebo_test_cases#1640

This is related to: gazebosim/gazebo_test_cases#1640

During the refactor of the SimulationRunner we seem to have broken log playback. In our current set up we need a sdf world to start a SimulationRunner. This sdf world is used for parameterizing which services and topics the server should advertise on. The client GUI then queries the server for running worlds derived from SDFs.

Unfortunately, when playing back from a log file, no SDF world is available. All the world information comes directly from the log file. This means that when we start a playback session the server always responds to the client with a default world. The client then proceeds to listen for the state on /world/default/state, however once the server starts running the log files, it publishes the state on /world/log_pendulum/state.

The current work around this PR proposes is to read the log file during initialization prior to setting up the transport topics. We then set up the relevant topics. There are probably better ways of handling such behaviour, but given the limited time this seemed to be the quickest way to restore functionality. Additionally, the current implementation will not work with zip files.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

This is related to: gazebosim/gazebo_test_cases#1640

During the refactor of the SimulationRunner we seem to have broken log
playback. In our current set up we need a sdf world to start a
SimulationRunner. This sdf world is used for parameterizing which
services and topics the server should advertise on. The client GUI then
queries the server for unning worlds derived from SDFs.

Unfortunately, when playing back from a log file, no SDF world is
available. All the world information comes directly from the log file.
Unfortunately, this means that when we start a playback session the
server always responds to the client with a default world. The client
then proceeds to listen for the state on `/world/default/state`, however
once the server proceeds to run the log files, it publishes the state on
`/world/log_pendulum/state`.

The current work around this PR proposes is to read the log file during
initialization prior to setting up the transport topics. We then set up
the relevant topics. There are probably better ways of handling such
behaviour, but given the limited time this seemed to be the quickest way
to restore functionality.

Signed-off-by: Arjo Chakravarty <[email protected]>
@azeey azeey requested a review from nkoenig September 9, 2024 18:26
@azeey azeey mentioned this pull request Sep 10, 2024
8 tasks
@arjo129
Copy link
Contributor Author

arjo129 commented Sep 10, 2024

Closing in favor of #2611

@arjo129 arjo129 closed this Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

gz-sim: log_record_dbl_pendulum.sdf
1 participant