[ODE] Getting Torques in Simulation

Nguyen Binh ngbinh at gmail.com
Thu Mar 30 10:37:45 MST 2006


I think I had mentioned this issue before.
We might need something like:
dBodyGetTorqueFromPreviousStep()....

You got 0 because you call the function outside the scope of the time
stepper.So the accumulated torque and forces got cleared to 0.
Right now,dBodyGetTorque()/Force doesn;t make sense to user program.
If you want to do that yourself, you can add a old_torque variable to body
and when you clear the accumulated torque, update it.
I have that code somewhere, but can't find it now. But that change is easy
though.

On 3/30/06, frederic Le Menn <flemenn at yahoo.fr> wrote:
>
> Hello,
>
> I work on locomotion with modular mobile robots. I saw that many people
> have problems with getting torques of bodies in ODE. I tried using
> dBodyGetTorque() but I had nothing but 0.
> I tried dJointFeedback() but the answer is 0 (no torque on body) although
> my system moves (I impose angular velocities with a function :
> {
>   double err, theta;
>   theta = dJointGetHingeAngle(actuator[n-1]);
>   err = angle - theta;
>   dJointSetHingeParam(actuator[n-1], dParamVel, 2*err);
>   dJointSetHingeParam(actuator[n-1], dParamFMax, 500);
> })
> I want to compute energy consumption therefore I need applied torques in
> my system.
> So anybody can help me telling me or posting program samples that give
> torques.
>
> Thank you for your attention
>
> ------------------------------
> Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les
> tarifs exceptionnels pour appeler la France et l'international.
> Téléchargez<http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.beta.messenger.yahoo.com>la version beta.
>
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>
>
>


--
--------------------------------------------------
Binh Nguyen
Computer Science Department
Rensselaer Polytechnic Institute
Troy, NY, 12180
--------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060330/e0540deb/attachment-0001.htm


More information about the ODE mailing list