Control robot with torque

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

Control robot with torque

Post by pmietki »

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.

https://drive.google.com/file/d/1C2kgZn ... sp=sharing

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

Re: Control robot with torque

Post by coppelia »

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

Post by pmietki »

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

Cheers

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

Re: Control robot with torque

Post by coppelia »

It depends on what physics engine you use. You can sometimes add some friction in the joint's engine properties. Another way would be to add some linear/angular damping for the attached shapes, in the material properties.

Cheers

Post Reply