[ODE] Setting torque imparted by a hinge joint

jon klein stjaerna at mac.com
Tue Jun 11 11:46:02 2002


Hi folks,

in my application, I'd like to be able to set the torque applied
to hinge joints.  I see that the preferred way to use a hinge
joint is to set the preferred speed of the joint, but I need to
be able to set the torque explicitly for compatibility with my
current physical simulator.

First of all, is it possible that a future version of ODE might
allow the joint torque to be a parameter that can be set in the
joint?


Secondly, in trying to do this manually, I seem to be getting the
wrong results.  Simulating hinge torque would impart both a
torque and center of mass force on the body, but I suspect that
the force I'm applying is somehow wrong, since the whole articulated
body is picking up angular velocity in a way that it shouldn't be.

Here are the forces I'm applying:

For a hinge joint (with normal n) applying a torque T on a body
(with center C relative to the hinge), the body's center of mass
torque should be nT and the instantaneous center of mass force
should be the cross product nT x C.  Both of these forces are
relative to the body's frame.  Is this not correct?

Any help is greatly appreciated!  Thanks!

- Jon