How can I get gravity torque?

Typically: "How do I... ", "How can I... " questions
Post Reply
yanxj20
Posts: 10
Joined: 14 Jan 2021, 08:11

How can I get gravity torque?

Post by yanxj20 »

Hi Coppelia:

I need Joint torques that compensate gravity at certain joint configuration. Is there any API in CoppeliaSim like

Code: Select all

gravTorq = gravityTorque(robot,configuration)
in MATLAB?

If not, I also tried to load the same manipulator model in MATLAB and use gravityTorque to calculate it. However, the COM and Inertia is quite different. And the ways to describe COM and inertia are quite different between MATLAB and CoppeliaSim.(in CoppeliaSim we have an inertia frame relative to body frame, and then we set principal moments of inertia/mass in inertia frame. In MATLAB we only have a body frame, then we set COM and inertia matrix relative to the body frame). I don't know how to convert. How can I achieve this?

Thanks in advance.

yanxj20
Posts: 10
Joined: 14 Jan 2021, 08:11

Re: How can I get gravity torque?

Post by yanxj20 »

Or can I get the .urdf file of certain .ttm file?

yanxj20
Posts: 10
Joined: 14 Jan 2021, 08:11

Re: How can I get gravity torque?

Post by yanxj20 »

Can anyone help? Any help is greatly appreciated.

coppelia
Site Admin
Posts: 8368
Joined: 14 Dec 2012, 00:25

Re: How can I get gravity torque?

Post by coppelia »

Hello,

did you have a look at this post about inertia frames?

Cheers

Post Reply