How to set the torque of joint?

Typically: "How do I... ", "How can I... " questions
Post Reply
Posts: 2
Joined: 01 Feb 2018, 06:06

How to set the torque of joint?

Post by sdh0007 » 02 Mar 2019, 14:44

Hi, I am trying to control the joint by torque, instead of velocity or position. Is there any lua API to do it? Or Is there other ways to do that? By the way, I am using Vortex.

I notice a API called sim.setJointForce, but it seems that it sets the maximum force or torque that a joint can exert rather than set the present force or torque of joint.

If I don't describe the issue clearly, plz let me know. Waiting for the reply. Thanks a lot!

Site Admin
Posts: 7020
Joined: 14 Dec 2012, 00:25

Re: How to set the torque of joint?

Post by coppelia » 06 Mar 2019, 15:20


the API function sim.setJointForce is the one you want to use: the force/torque will be applied to the joint until the specified maximum velocity is reached. If your load on the joint is small that will be faster than if your load is large. To apply a negative force/torque, use a negative max. velocity for that joint.


Post Reply