[ODE] Stacking objects

Jon Watte hplus-ode at mindcontrol.org
Thu May 13 09:40:23 MST 2004


Stability in imprecise systems is often about damping.

Thus, the first thing you could look into is making your ERP a bit smaller, or your CFM a big bigger. Although going too far leads to a springy system, which will oscillate, i e dynamic stability, which isn't what you want.

Another thing you should look into is regular dampening. You typically do this to linear velocity to model air drag: add a force that's scaled by c0 * v + c1 * v^2 and aimed in the anti-movement direction. You should do the same thing for angular velocity; something like:

  float aVel[3];
  float aTorque[3];
  dBodyGetAngularVelocity( myBody, aVel );
  aTorque[0] = - (aVel[0] * c1/c0) * aVel[0] * c0;
  aTorque[1] = - (aVel[1] * c1/c0) * aVel[1] * c0;
  aTorque[2] = - (aVel[2] * c1/c0) * aVel[2] * c0;
  dBodyAddTorque( myBody, aTorque );


There's no great physical analog for this, because it treats each of the euler angles separately, but it sure beats a kick in the pants :-) Using small values for c1 and c0 (say, no bigger than 0.001 for a 0.01 time step) is often still sufficient to make the simulation significantly more stable.

Cheers,

			/ h+


-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of
Robert Rose
Sent: Thursday, May 13, 2004 1:48 AM
To: ode at q12.org
Subject: [ODE] Stacking objects



Hi folks, I'm trying to do something that I thought would be extremely 
simple: stack three objects on top of each other.  Each object is just 
a rectangular block, and all begin "pre-stacked" in what is supposed to 
be a rest state.  I'm having tremendous difficulties getting the 
contact joint properties right so the scene behaves correctly.

When I run the simulation the blocks will sit quietly, then start 
shaking, and eventually one will blow up and fly out of the scene.  
Usually the one on the bottom starts shaking first.

Can someone please provide some insight as to how to set up contact 
joints so I can stack three blocks on top of each other and have them 
remain still?  thanks!

-robert

_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode




More information about the ODE mailing list