-
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
Clock plugin blocks gazebo if it starts paused. #591
Comments
Hi @DatSpace,
Thanks! |
Hi, Yarp version is: The clock variable is set on the terminal and all of the modules start from that terminal using a bash script, so it is everywhere. Gazebo is started with: The -u parameter is the one that blocks. Removing it starts everything fine. The log can be found in the link. |
I looked at the logic in the clock,see
networkIsNotInitialized is true, all the logic seems to be correct. Can you check if that is the case in your simulation?
|
I can verify that the variable is true in both cases, with and without starting paused. I did another test and removed the plugin from the starting command, and the same problem exists. Yarp prints that it is waiting for clock server to start broadcasting data. The difference is that in this case, it doesnt matter if its paused or not as the data will never be broadcasted anyway cause the plugin is not loaded. |
I did have a look at the code, and without being certain of what yarp expects, I found this:
on line 107. This binds the callback in the plugin the the world update event. The even is triggered on every simulation step. My concern is that assuming yarp expects at least one bottle to be transmitted to "start the broadcast", if the simulation starts paused, then no bottle is transmitted. I hope that helps. |
I think that this is the expected behaviour: if the simulation is paused, no bottle is transmitted. What I wonder is what is preventing the rest of Gazebo to start correctly. In the |
While the gazebo is stuck and yarp prints that it is waiting, if I connect to a new terminal and connect to the clock rpc port and send it the command to do 1 step, then it gets unstuck and everything works fine. Not sure if that helps. |
Are you able to reproduce the problem just running the I tried with:
and I am unable to reproduce the behaviour, gazebo starts correctly even if paused. Perhaps there is some strange interaction between the Version of software used in my test:
|
Well, I verified that this world: Where the model cer can be found in robotology/cer-sim
Does reproduce it. I started it without ROS with the command:
|
It is impossible to start a gazebo world paused, if the clock plugin is loaded.
The test was done with the cer model and the libgazebo_yarp_clock plugin. If gazebo is started with the -u parameter, then the world never finishes loading. And an message for waiting for clock to be published is printed.
The text was updated successfully, but these errors were encountered: