[ODE] auto-enable problem solutions?
Jani Laakso
jani.laakso at itmill.com
Mon Mar 1 13:33:09 MST 2004
Aras Pranckevicius wrote:
> Now, for auto-disabling to be really effective, you have to take some care
>
> // -----------------
> static void nearCallback (void *data, dGeomID o1, dGeomID o2) {
I'm using pretty similar case with Odejava:
// ignore if both o1 and o2 are plain Geoms (not bodies)
if (!b1 && !b2) return;
// check more if both are bodies
if (b1 && b2) {
// A body collides with body
// ignore if both bodies are connected by a joint
if (dAreConnectedExcluding (b1,b2,dJointTypeContact)) return;
// ignore if both bodies are disabled
if (!dBodyIsEnabled(b1) && !dBodyIsEnabled(b2)) return;
} else {
// A body collides with geom
// ignore if disabled body collides with plain geom
if (b1 && !dBodyIsEnabled(b1)) return;
if (b2 && !dBodyIsEnabled(b2)) return;
}
Have you made anything (or got any ideas) for the re-enable problem?
This auto disabling is good feature bust as someone earlier already
stated it has it's problems.
If I construct e.g. high tower and set it disabled by default and then
slowly push the lowest box somewhat ahead, then some boxes are left
floating in the air, upper boxes are not re-enabled because no contacts
occur with the enabled lower boxes.
Solutions
1. extend a reenabled body's AABB a little, and checking
which disabled bodies' AABBs are now intersecting, then re-enabling
those (comment from ql at ntlworld.com)
2. same than upper but temporarily expand the raw geom's dimensions
(comment from adam)
Upper solutions needs changing the ODE internals and checking this can
take too much of my time.
Does anyone have any other ideas?
--
Jani Laakso / IT Mill Ltd | Tel. +358 40 5898086 | http://www.itmill.com
More information about the ODE
mailing list