Torque values and simulation timestep

classic Classic list List threaded Threaded
1 message Options
law
Reply | Threaded
Open this post in threaded view
|

Torque values and simulation timestep

law
This post has NOT been accepted by the mailing list yet.
Hiya,

I'm plotting on using OpenRAVE to simulate a quadruped, in order to get an idea of torque requirements.
To get started I made a single DOF, single link pendulum to test controllers etc out on.
I've whipped up an inverse dynamics based PD controller using ComputeInverseDynamics(), which I set the outputs using SetDOFTorques(). I then simply set a desired position, with the desired velocity being zero. This all appears to work well and I can start the simulation, with the pendulum driving up to the desired position and settling.
My concern is the value of the output torques. My pendulum is modeled as a simple box of length 1, mass manually set to 1, with a COM of 0.5.
When I run my simulation, I output the gravity component from ComputeInverseDynamics(). This gives 4.9NM, which matches up with the pendulum when it is driven to it's desired position (from down to horizontal).
But the output torques to SetDOFTorques() are much higher and vary depending what I set the simulation timestep to.
If I maintain a controller update rate of 0.001 seconds, then for a simulation update of 0.0001 seconds, my output torque is approximately 87NM. If I alter the simulation timestep to 0.0005 seconds, keeping the controller rate the same the output torques drop down to about 18NM.

Can anyone shed some light on this? It's very possible Im missing something here!

Thanks very much