[ODE] auto-disable patch (yet again)

Aras Pranckevicius nearaz at interamotion.com
Wed Apr 21 14:03:01 MST 2004


Hi,

So, a patch for auto-disabling of bodies, yet again. It's here (watch
out for long links):
*
http://www.gim.ktu.lt/nesnausk/nearaz/files/ode-autodisable-20040421.pat
ch (patch file done with TortoiseCVS, I don't know if or how it works),
or
*
http://www.gim.ktu.lt/nesnausk/nearaz/files/ode-autodisable-20040421.zip
(just changed source files from today's public CVS).

What's there:
* 21 API functions! :)
* All auto-disable stuff is conditionally compiled, supply "#define
dAUTODISABLE_ENABLED 1" in ODE's config.h to enable it.
* Separate linear and angular velocity tresholds, see below.
* "Idle steps" AND "idle time" counters, see below.
* A body gets disabled when it has been idle for a given number of steps
AND simulation time. A body is idle when it's linear velocity squared
length AND it's angular velocity squared length are below corresponding
tresholds.
* So, auto-disable parameters are two tresholds (lin/ang), "idle steps"
integer, "idle time" number and a flag that can turn auto-disabling off.
These are stored in each body. Newly created bodies get these parameters
from world (so they are stored in world also, sort of "global"
parameters). There's also a helper function that sets auto-disable
parameters from world on a body. Initial auto-disable parameters in a
world are: flag=0 (auto-disable turned off), linear thr.=0.010, angular
thr.=0.008, idle steps=10, idle time=0.1. These values are from nowhere,
just worked ok in test_boxstack.

What I've changed as well:
* enabled "auto-disable" in all VC6 config files (VC6/_configs). I don't
know what else should be done for other platforms (editing makefiles?).


Aras Pranckevicius aka NeARAZ
http://www.gim.ktu.lt/nesnausk/nearaz/



More information about the ODE mailing list