[ODE] dWorldSetAutoDisableFlag doesn't work?

Mohsin Hasan mohsin.hasan at trivor.com
Wed May 26 12:34:33 MST 2004


I think we also need to update two other functions

dBodySetAutoDisableSteps
dBodySetAutoDisableTime

Because when these are set for each body, adis_stepsleft and adis_timeleft
are not updated and dInternalHandleAutoDisabling is working on these
variables. So even if we update a body's AutoDisableSteps and the body is
idle, dInternalHandleAutoDisabling will work with the original parameters
i.e. the default parameter (10) set by world as these haven't been updated
unless the body goes out of idle state. See code for
dInternalHandleAutoDisabling.

Mohsin

-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of Joe Ante
Sent: Wednesday, May 26, 2004 1:52 AM
To: ODE
Subject: Re: [ODE] dWorldSetAutoDisableFlag doesn't work?

> 
>> There is definitely discrepancy between how the defaults are set in
>> ODE (in dBodyCreate) and how the parameters are set for individual
>> objects.
> mohsin, can you please post a patch for how you think the code should
> be?
There is just a small bug in ode.cpp - dBodySetAutoDisableDefaults.

Eg.
b->adis.linear_threshold = dWorldGetAutoDisableLinearThreshold (w);

dWorldGetAutoDisableLinearThreshold () returns the sqrt of
adis.linear_threshold for obvious reasons. Thus the value should be squared
again when setting it in the body adis value.

It would however be simpler and faster to just replace
dBodySetAutoDisableDefaults with the following code, which instead of
calling functions to get the values from the adis, just copies the whole
adis struct.

void dBodySetAutoDisableDefaults (dBodyID b)
{
    dAASSERT(b);
    dWorldID w = b->world;
    dAASSERT(w);
    b->adis = w->adis;
    dBodySetAutoDisableFlag (b, w->adis_flag);
}

Joe Ante

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




More information about the ODE mailing list