[ODE] Bad bouncing behavior

Jaroslav Sinecky jsinecky at tiscali.cz
Tue Nov 14 09:09:48 MST 2006


So, I have just tried to simulate your case. Changed some settings in 
test_boxstack to be more "real" (gravity etc), made contacts bouncy 
(bounce=1.0) and dropped spheres with some horizontal velocity.
It worked surprisingly good!! Without friction it just bounces forever 
with the same horizontal velocity. With friction the horizontal velocity 
dropped at the first bounce to about 70% (for one specific sphere) and 
then stayed constant again. This first seemed pretty strange to me, but 
then I realized it's probably the momentum for sphere rotation (due to 
friction, sphere starts to rotate) which is completely physically 
correct. Later when sphere achieves rotation corresponding to it's 
horizontal velocity, no more friction occurs during contact and 
horizontal velocity stays constant. When I set the friction very low, I 
could even observe how the horizontal velocity is dropping a bit at 
every bounce untill the same +-70% was achieved. Great!

So, could your problem be that your ball has a high rotational inertia? 
Or try contact without friction. (If you can't set friction or bounce, 
that's a real flaw of the wrapper).

Jaroslav

ps. My test settings:

    contact[i].surface.mode = dContactBounce | dContactSoftCFM;
    contact[i].surface.mu = dInfinity;
    contact[i].surface.mu2 = 0;
    contact[i].surface.bounce = 1.0;
    contact[i].surface.bounce_vel = 0.1;
    contact[i].surface.soft_cfm = 0.0001;

  dWorldSetGravity (world,0,0,-9.5);
  dWorldSetCFM (world,1e-5);
  dWorldSetERP (world,1.0);
  dWorldSetContactMaxCorrectingVel (world,1.0);
  dWorldSetContactSurfaceLayer (world,0.001);





Mark Gjoel wrote:
> Well, I am very inhibited by the XNA wrapper, since it does most of 
> the work for me, so for most of you questions I can only say that it's 
> probably fine. For instance, I can't set the friction. I can however 
> set the cfm and erp. cfm was about 10^-7 and ERP was 1.0. I get a much 
> more suitable behavior with cfm at 0.1 and erp at 1.0, but I guess 
> that's mainly just parameter tuning.
>
> On 11/10/06, *Jaroslav Sinecky* <jsinecky at tiscali.cz 
> <mailto:jsinecky at tiscali.cz>> wrote:
>
>     Probably correcting velocity makes it's part. But it's strange
>     that the
>     tangential component of your ball velocity gets zeroed completely.
>     What
>     are your contact parameters? Do you use bounce? friction? cfm,
>     erp,...?
>
>     Jaroslav
>
>
>     Mark Gjoel wrote:
>     > First of all, I'm using the ODE 0.7 for XNA from pepperboy.net
>     <http://pepperboy.net>
>     > <http://pepperboy.net>, so this could entirely be a bug in the
>     > wrapper, but here goes:
>     > When I throw a sphere onto a plane it bounces straight up,
>     rather than
>     > bouncing in the direction that it was heading. I've tried to
>     > illustrate it below (but that will probably look badly anyway) as an
>     > ascii image. Is this an ODE problem, a problem with the wrapper or
>     > have I missed a crucial parameter?
>     >
>     >
>     > o           o
>     >      o      o
>     >          o  o
>     > _______o______
>     >
>     > Thank you,
>     > --
>     > // Mark Gjøl
>     > http://b0rken.dk
>     >
>     ------------------------------------------------------------------------
>     >
>     > _______________________________________________
>     > ODE mailing list
>     > ODE at q12.org <mailto:ODE at q12.org>
>     > http://q12.org/mailman/listinfo/ode
>     >
>
>



More information about the ODE mailing list