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

Hampus Soderstrom hampus at sxp.se
Wed Feb 8 22:20:08 MST 2006


Hi,

I could be wrong about this but I think dBodyGetTorque only returns  
the torque that you have set with dBodySetTorque().

the structure used by dJointGetFeedback  should contain the torque  
information you are looking for.

cheers
Hampa


9 feb 2006 kl. 10.26 skrev hajime hajime:

> Dear Hampa,
>
> Thank you very much for your reply.
>
> By joint, I meant body. So, I am trying to get
> the torque of a body. (Actually, I am using a
> program called Webots. It uses ODE as the
> Physics Engine. I defined a Servo node which
> is considered as a body inside ODE. I am trying
> to get the torque of that servo.)
>
> Sorry for the confusion.
>
> Hajime
>
> Hampus Soderstrom <hampus at sxp.se> wrote:
> 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
> >
>
>
>
> Find your next car at Yahoo! Canada Autos



More information about the ODE mailing list