Is there any sleep function in gazebo ?
I want to set an angular velocity for a model and then sleep for X seconds. Is this possible only using gazebo? Could you please give me a solution ? (for a sleep / delay function in gazebo, not for the example given earlier).
Asked by dragobette on 2020-09-14 10:51:04 UTC
Answers
This is late but for anyone searching:
gazebo::common::Time::MSleep(unsigned int miliseconds);
However, this seems to have a limit (anyone with an insight??) so if you need anything > 1 second, do a for loop like:
for(int i = 0; i < 1000; ++i) gazebo::common::Time::MSleep(unsigned int seconds);
Asked by Gavriel-CTO on 2023-02-20 07:55:41 UTC
Comments
When you say sleep, do you mean that simulation should pause for a while, or your plugin should stop sending commands for a while?
Asked by chapulina on 2020-09-14 15:29:50 UTC
I would like my plugin to stop sending commands for a while. Thanks for the question.
Asked by dragobette on 2020-09-15 08:49:31 UTC