[ODE] Bug in Joint Stops

Jon Watte hplus-ode at mindcontrol.org
Mon Dec 20 09:09:09 MST 2004


> Here is a workaround that the does the job, but I consider the original
> behavior a bug in ODE:

This is a FAQ. The correct way of setting a joint limit in ODE is:

  Set Low Param
  Set High Param
  Set Low Param Again

We have discussed this several times, even posted a diff on the 
list, but nothing has changed in the code so far. The preferred 
solution (inside ODE) is to set both limits, if you set one limit 
to conflict with the other limit.

Just for good measure, here the diff is again. Maybe this time 
someone with powers will apply it. (Apply it to joint.cpp):

===================================================================
RCS file: /cvsroot/opende/ode/ode/src/joint.cpp,v
retrieving revision 1.58
diff -c -r1.58 joint.cpp
*** joint.cpp   7 Dec 2004 14:30:51 -0000       1.58
--- joint.cpp   20 Dec 2004 17:08:16 -0000
***************
*** 397,406 ****
  {
    switch (num) {
    case dParamLoStop:
!     if (value <= histop) lostop = value;
      break;
    case dParamHiStop:
!     if (value >= lostop) histop = value;
      break;
    case dParamVel:
      vel = value;
--- 397,408 ----
  {
    switch (num) {
    case dParamLoStop:
!     lostop = value;
!     if (value > histop) histop = value;
      break;
    case dParamHiStop:
!     histop = value;
!     if (value < lostop) lostop = value;
      break;
    case dParamVel:
      vel = value;


Cheers,

			/ h+




More information about the ODE mailing list