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)
[ ] 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.
๐ฆ Bug fix
Summary
Fixes https://github.com/gazebosim/gazebo_test_cases/issues/1640
This is related to: https://github.com/gazebosim/gazebo_test_cases/issues/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
codecheck
passed (See contributing)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.๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ