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

gz-sim: log_record_dbl_pendulum.sdf #1640

Closed
azeey-test opened this issue Aug 29, 2024 · 10 comments · Fixed by gazebosim/gz-sim#2611
Closed

gz-sim: log_record_dbl_pendulum.sdf #1640

azeey-test opened this issue Aug 29, 2024 · 10 comments · Fixed by gazebosim/gz-sim#2611

Comments

@azeey-test
Copy link
Collaborator

Configuration

  • os: Any

Links

Process

Step 1 - Instructions work

Step 2 - Images (if there are any) match the result

@avanmalleghem
Copy link

Interested in !

@avanmalleghem
Copy link

avanmalleghem commented Aug 31, 2024

It seems like gz sim --playback ~/.gz/sim/log/<timestamp> is not working. Maybe because I run it into your docker setup ? Otherwise, the record seems ok
image

For example, I launched gz sim -v 4 --playback ~/.gz/sim/log/2024-08-31T14\:06\:29.302105487and it doesn't work and don't show any interesting error logs.

I tries with #1643 aswell and ran into the same issue.. So I think that's really with the playback feature. Any hint ?

@arjo129
Copy link

arjo129 commented Sep 3, 2024

Yes. I can confirm the playback is not working.

@avanmalleghem
Copy link

@arjo129 is it a docker related issue or even on an ubuntu host ? How can we progress on this one ?

@arjo129
Copy link

arjo129 commented Sep 3, 2024

It is an issue on the host as well. Im currently investigating. IT might be a bug in the scene broadcaster,

@arjo129
Copy link

arjo129 commented Sep 4, 2024

After some insane Spelunking of the code base there is a bug in the way the GUI and the server synchronize the world name. The GUI client queries what it thinks is the world name. The server sends a world name that does not match what the world name in the log file is.

Here is my console output as evidence:

arjoc@gz-ionic:~/ws/gz/ionic$ gz topic -l
/clock
/gazebo/resource_paths
/gui/camera/pose
/gui/currently_tracked
/gui/track
/stats
/world/default/clock
/world/default/stats
/world/log_pendulum/dynamic_pose/info
/world/log_pendulum/pose/info
/world/log_pendulum/scene/deletion
/world/log_pendulum/scene/info
/world/log_pendulum/state
/world/default/state
/world/log_pendulum/light_config
/world/log_pendulum/material_color

arjoc@gz-ionic:~/ws/gz/ionic$ gz topic -i -t /world/default/state
No publishers on topic [/world/default/state]
Subscribers [Address, Message Type]:
  tcp://192.168.1.36:33373, gz.msgs.SerializedStepMap

arjoc@gz-ionic:~/ws/gz/ionic$ gz topic -i -t /world/log_pendulum/state
Publishers [Address, Message Type]:
  tcp://192.168.1.36:36713, gz.msgs.SerializedStepMap
No subscribers on topic [/world/log_pendulum/state]

When I run the system in playback mode the GUI and the server are subscribing and advertising to 2 different topics.

Currently investigating why we have this regression. Will have a PR for it soon.

arjo129 added a commit to gazebosim/gz-sim that referenced this issue Sep 4, 2024
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]>
@arjo129
Copy link

arjo129 commented Sep 4, 2024

PR opened: gazebosim/gz-sim#2590

@azeey azeey added the bug Something isn't working label Sep 5, 2024
@avanmalleghem
Copy link

Isn't the issue related to the way gui config is managed ? I see in https://gazebosim.org/api/sim/9/gui_config.html : "For log-playback, the default file is $HOME/.gz/sim/<#>/playback_gui.config".

@azeey
Copy link
Contributor

azeey commented Sep 6, 2024

hmm, we should check if this is related to gazebosim/gz-sim#2497

@arjo129
Copy link

arjo129 commented Sep 6, 2024

@azeey I dont think this has to do with config files. Ive got a full fix for this already in gazebosim/gz-sim#2590. Its a regression because of refactors to SimulationRunner

arjo129 added a commit to gazebosim/gz-sim that referenced this issue Sep 12, 2024
gazebosim/gazebo_test_cases#1640

This commit adds a really simple regression check to make sure we
actually publish on the right topic.

Signed-off-by: Arjo Chakravarty <[email protected]>
arjo129 added a commit to gazebosim/gz-sim that referenced this issue Sep 12, 2024
* Adds a regression test for logplayback

gazebosim/gazebo_test_cases#1640

This commit adds a really simple regression check to make sure we
actually publish on the right topic.

Signed-off-by: Arjo Chakravarty <[email protected]>

* typo fix

Signed-off-by: Arjo Chakravarty <[email protected]>

* Make atomic

Signed-off-by: Arjo Chakravarty <[email protected]>

---------

Signed-off-by: Arjo Chakravarty <[email protected]>
Co-authored-by: Addisu Z. Taddese <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants