# Simulation different when gzclient is open

Hi, I have a simulation environment where I am stepping through the simulation by calling ROS services for pausing and unpausing the simulation (like it is done here). I noticed that when I run the simulation without the GUI, these services take longer to process which causes my simulation to run 5 times slower.

What does opening gzclient introduce that could give this behavior?

My intention is to run the simulation headless, and so far I was only testing the simulation with gzclient open, so I didn't notice this mismatch...

edit retag close merge delete

Sort by » oldest newest most voted

A fix for this can be found here. By subscribing to high-bandwidth topics, synchronization is somehow enforced and the simulation with and without gzclient seems like it's doing the same thing.

I am not satisfied with this fix, as I am not certain that it solves the problem, and it is just a workaround, but the actual bug is still there...

UPDATE: The above mentioned fix did improve the behavior, but my simulation would still crash or hang. So far I've been using real_time_update_rate = 0.0, which tries to optimize the simulation as much as possible. I have ran some experiments with limiting the real_time_factor = real_time_update_rate * time_step, and this seems to remove the issue. I set the real_time_rate to a value that is 4 times higher than the expected real_time_rate of the simulation, and it still seems to work. I will update the answer in case I encounter failures.

UPDATE: It worked just temporary. I am still experiencing the same issue.

more

## Stats

Seen: 270 times

Last updated: Jul 27 '17