[ODE] Bug in joint.cpp ?
andy@uniway.be
andy at uniway.be
Tue Jun 27 23:49:02 MST 2006
Hello,
Thanks to the help of Andres James, another solution was proposed... I tried it and it works in my case...
I don't know who is allowed to change/commit the source of ODE, but here is what should be changed:
In joint.cpp, replace line 538 from:
if (vel > 0) fm = -fm;
to:
if ((vel > 0) || (vel==0 && limit==2)) fm = -fm;
For explanation, you can check out the attached mail from andres...
greetz,
Andy
----- Original Message -----
From: Andres James <andres.james at gmail.com>
Date: Tuesday, June 27, 2006 2:05 pm
Subject: Re: [ODE] Bug in joint.cpp ?
> Hi Andy,
>
> >After some debugging, I came across this line of code (line 541 in
> joint.cpp)>if ((limit==1 && vel > 0) || (limit==2 && vel < 0)) fm
> *= fudge_factor;
>
> Does the problem occur at both limits or just the high stop?
> Because I
> think there's a problem with line 538: a joint at limit 2 with zero
> desired velocity should be applying the motor force *towards* the
> limit to try prevent any movement, currently it applies it away from
> the limit which could cause a jerk. I haven't tested this but try
> changing:
>
> if (vel > 0) fm = -fm;
>
> to:
>
> if ((vel > 0) || (vel==0 && limit==2)) fm = -fm;
>
> Andres
>
More information about the ODE
mailing list