Calculating gravity torque for joints of robot manipulator

Typically: "How do I... ", "How can I... " questions
Post Reply
Burhan
Posts: 1
Joined: 03 Oct 2020, 15:53

Calculating gravity torque for joints of robot manipulator

Post by Burhan »

Hi. I want to apply PD + Gravity compensation control and for that I need the gravity term to be calculated. In Coppeliasim, how I can get gravity torques applied to the robot arm's joints? For example, if you calculate inverse dynamics by making velocity and acceleration zero, then you will only get gravity torque vector. However, in Coppeliasim when you use command geJointForce, it just returns torque and doesn't let you for example, specify velocity and acceleration as zero, so you will get only gravity torques. Should I create my own inverse dynamics method for that, like Newton-Euler? Thank you very much.

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

Re: Calculating gravity torque for joints of robot manipulator

Post by coppelia »

Hello,

if you need a specific controller like in your case, make sure to use a joint callback function. In a joint callback function, you can gather relevant information (e.g. joint angle, link mass, link velocity, etc.) and provide as output a force/torque, and a maximum velocity (the force/torque will be applied until the specified maximum velocity is reached. If that value is high enough, it will never be reached). That will happen in each simulation pass, and you can take into account also the joint velocity, etc.
What algorithm you use in your joint callback function is entirely up to you

Cheers

Post Reply