[gazebo simulator] is it possible to increase the physics max step size? #161
-
I'm newby in Gazebo and running the first tests. I inserted "iCub with hands" in the simulator and run succesfully the tutorial_arm. Then I tried to increase the physics max step size (in the gazebo gui) from 0.001 to 0.002, in order to have a faster (less accurate) simulation, obtaining sometimes a crash of gazebo, sometimes the icub crumpling on itself. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
Senior developers helping on this might be @randaz81 @traversaro @Yeshasvitvs @valeriosperati you should have received an invitation to join our GitHub community (this will allow you for example to assign labels). If you did not receive it, please check the email account associated to your GitHub profile. Thanks @emilio-cartoni for contributing to keep Q&A neat 😉 |
Beta Was this translation helpful? Give feedback.
-
Hi @valeriosperati , Unfortunately the differential equations describing the evolution of a complex multibody system such as the iCub (with small light links such as the fingers and large heavy links such as the chest) are known to be rather stiff, so it does not surprise me that you have numerical stability problems by doubling the integrator fixed step. Going back to your (I guess) original goal, I think there are several options that you may want to investigate:
In general the right thing to do before taking any of these steps would be to profile Gazebo to understand which aspect of the simulation is your bottleneck, but unfortunately this require to compile Gazebo from source and some insight on the internals of Gazebo, as Gazebo itself does not provide any tool to profile with aspect of simulation are taking more time. If you are nevertheless interested in this, you can look into [1]. |
Beta Was this translation helpful? Give feedback.
-
It's possible, in principle. I do no know about gazebo crashes (sometimes they occur without a specific reason due to problems in ogre, the graphic library). Instead, if you see the icub crumpling on itself, it is most likely that current PID gains of icub are not stable anymore. Indeed, they are tuned to work at a specific simulation step and they should be reduced accordingly if you increase the step size (while decreasing it is always ok). Unfortunately, it is difficult to suggest a solution for your problem. (*) you can also run gzserver (the physics simulation) on a remote machine, and gzclient (the display) on your pc. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot for the explanations and the informations. Right now I'm just exploring Gazebo, testing the icub tutorials both on Gazebo and in iCub_SIM. For now, I will keep the physics step size to its default value. PS: please, it is the first time that I interact with GitHub issues: can we consider this issue closed? Is it up to me to "close and comment"? Thanks, Valerio |
Beta Was this translation helpful? Give feedback.
-
Here's some info on how to contribute. Usually, the OP (you in this case) is responsible for judging whether the issue can be closed or not. Maintainers can also kick in and say a word in this respect. I think we can close it. |
Beta Was this translation helpful? Give feedback.
Hi @valeriosperati ,
in general all the models provided in the
icub-gazebo
repository have been tested with the default Gazebo physics step size of0.001 s
. Notice that all the Gazebo physics engines at the moment use a fixed-step integrator, so this set the actual step of the integrator.Unfortunately the differential equations describing the evolution of a complex multibody system such as the iCub (with small light links such as the fingers and large heavy links such as the chest) are known to be rather stiff, so it does not surprise me that you have numerical stability problems by doubling the integrator fixed step.
Going back to your (I guess) original goal, I think there are several …