[ODE] requested fix in joint limit setting function

Tyler Streeter tylerstreeter at gmail.com
Tue Dec 7 11:45:45 MST 2004


Could someone with CVS access please commit a bug fix for the problem
where joint low/high stops must be set twice?  This problem is bound
to keep confusing new users.  I'll quote Jon Watte since he has
mentioned this numerous times:

"There's a problem where you have to set stops twice, because 
you're not allowed to set stops that even temporarily contradict 
each other. Thus, if the stops start out at 0, and you set the 
low to 2, that will be ignored, because the high is still at 0."

...and here's the problematic code in joint.cpp:

void dxJointLimitMotor::set (int num, dReal value)
{
  switch (num) {
  case dParamLoStop:
    if (value <= histop) lostop = value;
    break;
  case dParamHiStop:
    if (value >= lostop) histop = value;
    break;
...
  }
}

It might need a special setting function that takes both stops at once.

Also, another thing that might help new users (and reduce some of the
mailing list volume) is putting a direct link to the wiki faq in a
more prominent place (e.g. on the ode.org docs page instead of the
ode.org -> community -> ODE wiki area -> faq).

Thanks!

Tyler Streeter


More information about the ODE mailing list