[ODE] How to obtain the torque of a joint using dBodyGetTorque

Hampus Soderstrom hampus at sxp.se
Wed Feb 8 20:19:42 MST 2006


Hi Hajime,

dBODYgetTorque (only works on bodies).

I'm not sure what you mean by "the torque of the a joint". Are you  
sure you don't just want the angular velocity of it?

dJointGetFeedback can return the amount of torque added to the joined  
bodies of a joint. Perhaps that is what you are looking for.

cheers
/Hampa

9 feb 2006 kl. 08.36 skrev hajime hajime:

> Hello,
>
> I have been trying to get the torque of a joint .
> I have something like:
>
> const dReal *tor = dBodyGetTorque(joint1);
> printf("x = %f, y = %f, z = %f\n", tor[0], tor[1], tor[2]);
>
> However, I keep getting zeros as the output.
>
> Is this something to do with the force accumulators being set to  
> zeros?
> Could you please let me know how to get the torque of a joint?
>
> I read that somebody used:
>
> dBodyGetTorque(body)
> torquex#=dVectorX();
> torquey#=dVectorY();
> torquez#=dVectorZ();
>
> When I tried the above statements, I got error messages. Thanks.
>
> Find your next car at Yahoo! Canada Autos
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list