[ODE] Falling Through the ground (that old problem again)

Wesley Smith wesley.hoke at gmail.com
Thu Sep 21 09:37:09 MST 2006

Figured out what the problem is.  I modified test_collision to reflect
the exactly my own ODE setup and it still work.  However there was
still one discrepency.  When creating the mass of spheres, I had this:

dMassSetSphere(&(x->mass), 5., x->sphere_radius);
dMassAdjust(&(x->mass), 1.0);

After commenting out dMassAdjust, everything worked just fine.


On 9/19/06, Wesley Smith <wesley.hoke at gmail.com> wrote:
> I have a very simple test case of dropping a sphere on a plane just to
> make sure the environment is setup.  When I drop the sphere, it
> bounces appropriately and eventually comes to a near standstill.
> However, it never gets completely still and eventually falls through
> the plane.  This is what my contact joint params look like:
> for (i=0; i < MAX_CONTACTS; i++) {
>                 contact[i].surface.mode = dContactBounce | dContactSoftCFM;
>                 contact[i].surface.mu = dInfinity;
>                 contact[i].surface.bounce = 0.8;
>                 contact[i].surface.bounce_vel = 0.5;
>                 contact[i].surface.soft_cfm = 0.01;
>         }
> This happens with both normal time stepping and quick stepping.  I've
> also intentially set bounce_vel quite high to test if it's working.
> It seems that this is where my simulation is failing.  When I look at
> the velocity of the ball at each timestep, the value converges to (0,
> 0, -0.08) which is way below the threshold.  The threshold should take
> effect since I've enabled the dContactBounce flag.
> Now, I believe that ODE should set surface.bounce to be 0 when the
> velocity of the sphere has a linear_vel magnitude below 0.5 with the
> way I have things setup.  Does ODE not then set the linear_vel to be
> (0, 0, 0) on the next time step since there was no bounce?  Do I have
> to take car of this myself?  I think this is my problem, but I'm not
> sure if it's my responsiblity or ODE's to take care of this.  What I'm
> seeing is a contant (0, 0, -0.08) such that the object eventually
> falls through the plane and off the screen.
> Any insights are appreciated.
> thanks,
> wes

More information about the ODE mailing list