Page 1 of 1

Calculating gravity torque for joints of robot manipulator

Posted: 20 Nov 2021, 18:42
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.

Re: Calculating gravity torque for joints of robot manipulator

Posted: 22 Nov 2021, 08:46
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