articulations-robot-demo icon indicating copy to clipboard operation
articulations-robot-demo copied to clipboard

Joint Torques Availability

Open kodie-artner opened this issue 4 years ago • 3 comments

Is it possible to derive joint torques from the ArticulationBody? ArticulationBody.jointForce looks to be a similar but it only returns zero for revolute joints in all the tests I have conducted. I am using Unity 2020.3.19.

kodie-artner avatar Oct 05 '21 16:10 kodie-artner

Related to this discussion https://forum.unity.com/threads/articulation-body-getjointforce-always-zero.1030087/

kodie-artner avatar Oct 05 '21 17:10 kodie-artner

The torque exerted by a joint is the magnitude of the cross product of the attached links (i.e. all links that come after a joint) inertia tensor times its angular acceleration. You can obtain the inertia tensor of an articulation body object.

In case the axes of rotation and center of mass are offset, apply the parallel axis theorem

"Unity - Scripting API: ArticulationBody.inertiaTensor" https://docs.unity3d.com/2020.1/Documentation/ScriptReference/ArticulationBody-inertiaTensor.html

edit: replaced velocity with acceleration

RomanStadlhuber avatar Oct 05 '21 18:10 RomanStadlhuber

@kodie-artner This API has not been implemented yet, It will return 0 value for now. We are in process of implementing, the code necessary to return joint force values for ArticulationBodies.

vidurvij-Unity avatar Oct 07 '21 19:10 vidurvij-Unity