[ODE] Joint torque generated by desired joint velocity (dParamVel) for hinge joint

Gazi Alankus alanic at gmail.com
Mon Apr 30 21:36:31 MST 2007

Hello ODE Experts,

I would like to get the portion of the joint torque that is
responsible for making the desired joint velocity possible for a hinge
joint. The torque value I get should be such that, given the same
situation, it should be able to do the same job as setting dParamVel.

Here is my scenario: I will save the state of the simulation as best
as I can, set dParamVel to a desired joint velocity, step the
simulation, somehow read the torque portion that dParamVel is
responsible for.

Then at some other time, I will load the state of the simulation that
I saved, set the joint torque that I've read before, step the
simulation and I expect the same result I got before with dParamVel.

When I read the joint torque using dJointSetFeedback() and
dJointFeedback class, I see that the torques I receive include any
torque necessary to keep the joint together. I dug down into the code
and I saw that the desired joint velocity is used in joint.cpp:523 as
info->c[row] = vel;

Then I tracked down this info structure by debugging, but I got lost
in step.cpp:1278 as
joint[i]->vtable->getInfo2 (joint[i],&Jinfo);

and this JInfo is not used later.

So, if there is a way that I can actually get what I want, any
direction would be very helpful. I'm thinking about using the
projection of the torque on the joint axis and giving it a try. Do you
think it would be accurate?

Any help would be appreciated.


More information about the ODE mailing list