Gazebo | Ignition | Community
Ask Your Question

Unstable Simulation At Low max_step_size?

asked 2016-03-23 20:09:13 -0600

xanderai gravatar image

updated 2016-03-24 18:43:18 -0600

My entire world:

<?xml version='1.0' encoding='utf-8'?>
<sdf version="1.5">
    <world name="bin-picking">
        <physics type="ode">
        <include><uri>model://triangle</uri><name>triangle_0</name><pose> 1.5  -0.705 1.075   0   0       1.134</pose></include>

Here is the triangle model:

<?xml version='1.0'?>
<sdf version='1.5'>
  <model name='cylinder'>
    <link name='link'>
      <pose frame=''>0 0 0 0 -0 0</pose>
      <visual name='visual'>
      <collision name='collision'>

Running this: gazebo --verbose will produce an unstable simulation with jittery ground plane collision that never ends in Gazebo 6.5.1, like in this video.

This appears to be entirely a result of having a large max_step_size. A value of 0.001, for example, will not cause this problem. The environment will appear stable. Is this instability at large step sizes expected? What explains it?

Our difficulty with using small step sizes is that it affects the camera's rendering rate and we'd like to have the camera rendering at a certain rate in relation to physics updates.

Modifying my .world file to use the "world" solver helped the stability of it:

<world name="bin-picking">
    <physics type="ode">

The above situation with a single triangle is now stable. However, slightly more complicated scenes, like a scene with 2 boxes, 2 cylinders, 2 triangles, and 2 hexagons will exhibit some of this collision instability simply from running the simulation without any interaction.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-03-25 10:02:04 -0600

nkoenig gravatar image

Simulation will become increasingly more unstable the larger the step size. This is just how a fixed time step size physics simulation operates.

Your model however lacks <inertia> which will cause your model to be unstable. You should definitely fix that.

edit flag offensive delete link more


Thanks. In my complete .world, all of the objects have proper inertia. I just removed it for the minimal reproducible example above. We can simply take multiple time steps at a smaller step size for the same effect.

xanderai gravatar imagexanderai ( 2016-03-28 12:07:34 -0600 )edit

We were able to solve our instability while maintaining the `max_step_size` that's convenient for us by switching from the ODE (explicit) physics engine to the Simbody (implicit) physics engine. More here:

xanderai gravatar imagexanderai ( 2016-03-30 12:31:50 -0600 )edit

Unfortunately, the vimeo link is down. Can you describe how switching to simbody fixed the issue? What solver parameters did you use?

JakobThumm gravatar imageJakobThumm ( 2021-06-22 10:42:55 -0600 )edit

Question Tools

1 follower


Asked: 2016-03-23 20:09:13 -0600

Seen: 1,339 times

Last updated: Mar 25 '16