## Control robot with torque

Typically: "How do I... ", "How can I... " questions
pmietki
Posts: 5
Joined: 10 Sep 2020, 07:28

### Control robot with torque

Hi,
I'm trying to control robot with torque. Using sim.addForceAndTorque method robot is not behave correctly. If I try to assign torque as a vector <0,2,0> why my measured torque values are higher than i set and robot oscillating ?
Please check scene (link under to download) i tried to control left_joint_joint_2 by acting on dummy link - left_dummy_2. Maybe my joint or link configuration are wrong? Should i use another method to apply torque to joint? I also checked demo "motorControllerExamples.ttt" from your scenes but that torque controller is based on setting velocity.

coppelia
Posts: 8513
Joined: 14 Dec 2012, 00:25

### Re: Control robot with torque

Hello,

if you want to apply a specific force/torque to a joint, then enable the motor and make sure that the control loop is disabled. Then specify a very high target velocity (which will never be reached), and regulate the force/torque with sim.setJointMaxForce.

Cheers

pmietki
Posts: 5
Joined: 10 Sep 2020, 07:28

### Re: Control robot with torque

Thank you for reply. If I use this method joint start oscillating, how to reduce this ?

Cheers

coppelia