[ODE] Bug in Joint Stops

Thorsten Roggendorf thorsten.roggendorf at uni-bielefeld.de
Mon Dec 20 17:00:43 MST 2004


Hi

I've written a simulation of a 6-legged Walker. I made the joints
"springy" by setting desired angles as joint hi- and lo stops and
setting the according cfm and erp parameters to yield the spring
properties as desired.
If I then use a sine function (testing the setup) to drive a joint only
one limit will be effective (hi or low), depending on which stop is set
first.
Here is a workaround that the does the job, but I consider the original
behavior a bug in ODE:

void PoweredHinge::goSpring(float alpha) {
    // Workspace limits:
    double newAng((alpha > angMax) ? angMax
               : ((alpha < angMin) ? angMin : alpha));
    if(getAngle() < newAng) {
        setParam(dParamHiStop, newAng);
        setParam(dParamLoStop, newAng);
    }
    else {
        setParam(dParamLoStop, newAng);
        setParam(dParamHiStop, newAng);
    }
}

Note that the order for setting the stops depends on the situation.
Otherwise the system will not work as expected. Also you need to set
both stops to get a clean behaviour without jumpy force signals -
setting lo a bit lower than hi does NOT help fixing the problem! As
implemented above the system works beautifully, you did a great job on
ODE!
If anybody else is working on walkers: The above system is extremely
stable. I can set the time step as high as 1.0 and still have a well
behaved system. That is in closed kinematic chains with as much as 18
degrees of freedom at some times and my controllers do not produce
consistent output to drive that system. Not that such a big time step
makes much sense if you want publishable results but for testing or
gaming this is very interesting.

  Thanks for this great dynamics engine

    Thorsten



More information about the ODE mailing list