-
Notifications
You must be signed in to change notification settings - Fork 48
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
Gazebo freezes when YARP_CLOCK is set #526
Comments
Back in time (2015/2016) this used not to be the case, but at some point it started happening, probably due to some Is this happening in the case of empty world? |
Yes, it freezes just with: |
Then it is possible that there is something going on with the Network constructors or the checkNetwork method? |
I don't remember changing anything... |
I am afraid that bisecting will not help as gazebo-yarp-plugins will not compile against of a YARP older then 2018/2019 . Probably it is easier to check where the program is blocked after is launched via |
To add some context, when launching Gazebo with that configuration on the terminal one reads
It seems that this is happening in Time::useNetworkClock(const std::string& clock, const std::string& localPortName) and is part of the initialization of the object
The The sequence of calls should be the following: yarp::os::Network::Network() |
Thanks @xEnVrE , after your comment I am able to connect the dots. Probably the regression was caused by robotology/yarp#1277, that introduced the early clock initialization. Before that, the Network clock was lazy inizialized, so the plugin was able to load correctly even if YARP_CLOCK was set to |
A possible solution is to switch to use the system clock after yarp::sig::Network was initialized, and switch back to use the default clock once |
Fix #526 Add also regression test for the issue
A fix for this issue is provided in #537 . |
* Fix Gazebo freezing if YARP_CLOCK is set Fix #526
If I set the env variable:
YARP_CLOCK=/clock
and the I start gazebo with:
gazebo -s libgazebo_yarp_clock.so
then the system immediately freezes (the gazebo gui does not appear).
So, currently, the only way to work with simulated time is to have all process with YARP_CLOCK=/clock, with the only exception of gazebo that must have this env variable unset.
Thus the environment variable YARP_CLOCK cannot be put into a bash_rc file.
The text was updated successfully, but these errors were encountered: