Page 1 of 1

Direct joint torque/force control

Posted: 16 Jul 2018, 12:58
by tgurriet

Would it be possible have direct control over the torque/force at the joint?

I know it's possible to do so by enabling the motor at the joint and playing with desired velocity and max torque.
But it is a bit convoluted for something that basic...

When the joint is in torque/force mode but the motor is not enable, it should be possible to set a torque different from zero via a single API function call.

Thanks in advance,

Re: Direct joint torque/force control

Posted: 20 Jul 2018, 08:48
by coppelia

setting the torque/target velocity of your joint when the motor in not enable will have no effect: the joint will remain free (not motorized).

When your motor is enabled, simply set a large target velocity (e.g. 600 deg/s for a revolute joint). Then, simply modulate the torque/force with sim.setJointforce.


Re: Direct joint torque/force control

Posted: 20 Jul 2018, 10:25
by tgurriet
Sure, but that requires 2 API calls (to set the force and change the sign of the target velocity) for something very basic.

Hence the "request" for a mode where we can control joint torque directly with one API call.