[ODE] Jittering bricks
Pete Baron
sibaroni at hotmail.com
Sat Aug 7 11:13:26 MST 2004
Hi folks,
apologies if this question has been answered before - I dug through the
older email collections but didn't find a solution that fits my problem.
I've been playing with ODE for a couple of months (fantastic job Russell!)
trying to get buildings and walls built of large numbers of blocks to be
stable. The problem is that the lowest layer of bricks jitters due (I
think) to the pressure from all the bricks above them. The size of the
jitter can be reduced by decreasing the time-step, but it has to go down to
0.01 or less to enable the blocks to 'sleep' and that's just too slow to be
useful - 0.05 seems to be about the slowest with a reasonable screen update
rate, and multiple calls takes too much time!
I've experimented a lot with the various simulation parameters without
success and I've also tried modifying the code with a variety of filters and
checks (as detailed on my home-page
http://home.btconnect.com/pete/homepage.html) but in the end I gave up. I'm
still interested in getting this working though so any ideas would be
gratefully received! There are a couple of screen shots of the sort of
thing I'm doing on my homepage.
Here are my current ODE settings:
// some ODE related constants
#define NUM 2000 // max number of objects
#define DENSITY REAL(0.1) // density of all objects
#define GPB 1 // maximum number of geometries per body
#define MAX_CONTACTS 3 // maximum number of contact points per body
#define CUBE_SIZE REAL(0.5) // size of each side of the cubes
#define REPETITIONS 1 // how many times does the physics run per video
refresh
#define ITERATIONS 6 // number of iterations of the LCP solver
#define OVER_RELAXATION REAL(1.3) // SOR over-relaxation parameter
#define GAME_TICK REAL(0.01) // amount of time per frame
#define GRAVITY REAL(-0.50) // force of gravity
#define ERP REAL(0.95) // error reduction parameter (correct error by
ERP*100% per frame)
#define CFM REAL(0.01) // constraint force mixing (closer to zero =
harder surfaces)
#define PUSHOUT 0.5f // maximum velocity allowed when forcing penetrating
blocks out of each other
#define PENETRATION REAL(0.001) // amount of interpenetration allowed
before pushing blocks out
// friction values for various types of contact
#define DEFAULT_FRICTION dInfinity
#define BOX_PLANE_FRICTION dInfinity
#define BOX_BOX_FRICTION REAL(1.00)
dWorldSetAutoDisableLinearThreshold(world, REAL(0.055)); // linear speed
threshold for 'inactivity'
dWorldSetAutoDisableAngularThreshold(world, REAL(0.260)); // angular speed
threshold for 'inactivity'
dWorldSetAutoDisableSteps(world, 160); // go to sleep after X steps
of inactivity
cheers,
Pete Baron
sibaroni at hotmail.com
More information about the ODE
mailing list