[ODE] strange hinge joint behaviour: bug?

Mauro G. Todeschini mauro2006todeschini at itia.cnr.it
Wed Nov 15 08:41:29 MST 2006

Remi Ricard wrote:
> Hi Mauro,
>> Hi,
>>     I created a hinge joint between 2 bodies: b1 and b2.
>> dJointAttach(joint, b1, b2);
>> I set the joint parameters (anchor axis and so on).
>> I set LoStop=0.0f and HiStop=2.0f.
>> I fixed b1 to the environment with a fixed joint.
>> The joint works but if I attach b2 directoly to the world
>> dJointAttach(joint, 0, b2);
>> with exactly the same joint parameters, the joint lets b2 rotate in the
>> opposite direction; as if i changed LoStop to -2.0f and HiStop to 0.0f.
>> Has anyone else experienced the same behaviuor?
>> It seems strange to me but I'm not really sure It is a ODE bug.
>> I'm using a recent ODE SVN version.
> When you attach only one body to a joint. The body is "moved" to the
> first "node" of the joint and it is considered as body1.
> So the inversion of rotation is almost normal knowing the move.
Ok thanks, If this is what happens internally It's now clear the
behaviuor. I noticed that if I call dJointGetBody(1) I get b2 (so the
move is only internal) in both cases.
I think however that this ODE behaviour is a bit confusing; It may be a
good idea to let different behaviuor in the case a body is attaced in
the first or second position of a joint to the environment.
It's only a hint, perhaps there are good reasons to leave things the way
they are now.

Thanks again, bye.

Mauro G. Todeschini

More information about the ODE mailing list