Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Setting physics engine time step explicitly


I am currently using gazebo with ODE to simulate fluids, with the fluid simulation part being done with an external framework. The fluid simulation is making use of an adaptive timestep, which changes during the simulation. The way that the communication between gazebo and the fluid dynamics engine is done is through a world plugin. As the fluid timestep is adaptive, it is necessary to use the same time step for both the physical and the fluid simulation. Is there a way to achieve this programmatically? I see that I can specify the timestep through the physics engine pointer doing something like this


, where the getTimeStepSize refers to the fluid simulation. I am doing the update on every ConnectWorldUpdateEnd event. But this does not guarantee that the timestep will be the same, since it only sets the maximum step size, not the actual time step size. Is that enough? Any help would be appreciated.

Best, Manos