Gazebo | Ignition | Community
Ask Your Question
0

Unstable Simulation At Low max_step_size?

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

xanderai gravatar image

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

My entire world:

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

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'>
        <geometry>
          <cylinder>
              <radius>.5</radius>
              <length>1</length>
          </cylinder>
        </geometry>
      </visual>
      <collision name='collision'>
        <geometry>
          <cylinder>
              <radius>.5</radius>
              <length>1</length>
          </cylinder>
        </geometry>
      </collision>
    </link>
  </model>
</sdf>

Running this: gazebo --verbose my_world.world 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">
        <max_step_size>0.050</max_step_size>
        <real_time_update_rate>20</real_time_update_rate>
        <ode>
            <solver>
                <type>world</type>
            </solver>
        </ode>
    </physics>

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
1

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

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

Comments

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 -0500 )edit
1

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: https://vimeo.com/107517366

xanderai gravatar imagexanderai ( 2016-03-30 12:31:50 -0500 )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 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 1,353 times

Last updated: Mar 25 '16