[ODE] possible bug regarding dJointAddHingeTorque and dJOINT_REVERSE

jon klein jklein at spiderland.org
Mon Jan 19 11:38:25 MST 2004


On Jan 19, 2004, at 11:09 AM, Martin C. Martin wrote:

> dJointAddHingeTorque(dJointID joint, dReal torque)
>
> Applies the torque about the hinge axis. That is, it applies a torque 
> with magnitude torque, in the direction of the hinge axis, to body 1, 
> and with the same magnitude but in opposite direction to body 2. This 
> function is just a wrapper for dBodyAddTorque()
>
> So reversing the role of body1 and body2 should reverse the motion.

Fair enough, but in that case, I think there's some inconsistent
behavior going on.  Shouldn't a positive torque always result in a
positive hinge velocity?  This is currently not the case -- when
dJOINT_REVERSE is set, a positive torque will cause a negative
velocity (as reported by dJointGetHingeAngle).

So in the case that dJOINT_REVERSE is set, perhaps the hinge's
normal vector should also be reversed, or dJointGetHingeAngle
should change the sign of the velocity so that the relationship
between torque and velocity is consistent.

- jon



More information about the ODE mailing list