# [ODE] How to obtain the torque of a joint

Ignacio García Fernández ignacio.garcia at uv.es
Mon Dec 4 02:54:50 MST 2006

```Hi Jimmy,

These functions an the associated structures allow you to know what
force and torque is applied to the bodies linked by a joint, but only
those forces and torques due to the joint itself.

I'm not sure that this is what you are looking for.

You can think of a dJointFeedback as a device that is able to read the
forces and torques that appear in a joint, due to the joint itself.

The function dJointSetFeedback() attaches one of these devices to a
joint, and the function dJointGetFeedback() reads the device.

I cannot give you an example, as I have never used them :(

However, as far as I understand from the manual, you must call
dJointSetFeedback() once for each joint you want to monitor, and then,
you call dJointGetFeedback() whenever you want to know the info.

Hope this gives some light.

Regards

Ignacio

El jue, 30-11-2006 a las 16:27 +0000, mango juice escribió:
> Dear Ignacio,
>
>
> I have checked the manual already but I got
> incorrect results. I guess I do not understanding
> how to use the functions properly? Please refer
> to my previous posting titled
> "How to measure the joint torque correctly".
>
> To obtain the total force applied to a joint which
> rotates about the x-axis, which way is correct:
>
> dJointFeedback* feedback = dJointGetFeedback(joint);
> 1. feedback->f1[0]
> 2. feedback->f1[0] - feedbackf2[0]
> 3. sqrt(feedback->f1[0]^2 + feedback->f1[1]^2 + feedback->f1[2]^2)
> 4. open to suggestions
>
> By the way, what does the dJointSetFeedback function has
> to do with getting the force/torque information? Am I supposed
> to call it before dJointGetFeedback? I don't quite understand
> what the description in Sect 7.2 means. Maybe that is
> the problem. Could you please give me an example?
>
> Thank you very much in advance.
>
> Jimmy
>
>
>
> >From: Ignacio García Fernández <ignacio.garcia at uv.es>
> >To: ode at q12.org
> >Subject: Re: [ODE] How to obtain the torque of a joint
> >Date: Thu, 30 Nov 2006 09:47:34 +0100
> >
> >Both for force and torque, you should look at Section 7.2 of the ODE
> >manual, where it explains the functions
> >
> >void dJointSetFeedback (dJointID, dJointFeedback *);
> >dJointFeedback *dJointGetFeedback (dJointID);
> >
> >and the structure dJointFeedback.
> >
> >Regards.
> >
> >El mié, 29-11-2006 a las 19:46 +0000, mango juice escribió:
> > > Hello!
> > >
> > > I am having difficulty in obtaining the torque of a
> > > joint correctly. Could anybody please give me an
> > > example on how to do it?
> > >
> > > Thank you very much in advance.
> > >
> > >
> > > ______________________________________________________________________
> > > and see how cool it is to get Messenger with you on your cell phone.
> > > _______________________________________________
> > > ODE mailing list
> > > ODE at q12.org
> > > http://q12.org/mailman/listinfo/ode
> >--
> >May the source be with you
> >---------------------------------------------------------------
> >Ignacio García Fernández                  Instituto de Robótica
> >http://robotica.uv.es/~ignacio/                Tlf. 96 354 3671
>
>
> ><< signature.asc >>
>
>
>
>
> >_______________________________________________
> >ODE mailing list
> >ODE at q12.org
> >http://q12.org/mailman/listinfo/ode
>
> _________________________________________________________________
> Buy, Load, Play. The new Sympatico / MSN Music Store works seamlessly with
> Windows Media Player. Just Click PLAY.
> http://musicstore.sympatico.msn.ca/content/viewer.aspx?cid=SMS_Sept192006
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
--
May the source be with you
---------------------------------------------------------------
Ignacio García Fernández                  Instituto de Robótica