API differences

Typically: "How do I... ", "How can I... " questions
Post Reply
faisalkhan
Posts: 14
Joined: 19 Sep 2018, 15:53

API differences

Post by faisalkhan »

what is the difference between setting joint angle API and setting joint position? Are both are the same but applicable in a different mode like passive, force/torque mode? A detailed answer would be appreciated.

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

Re: API differences

Post by coppelia »

So what are the two API functions exactly that your question refers to?

faisalkhan
Posts: 14
Joined: 19 Sep 2018, 15:53

Re: API differences

Post by faisalkhan »

1)simxSetJointPosition
2)simxSetJointTargetPosition

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

Re: API differences

Post by coppelia »

sim.setJointPosition (or simxSetJointPosition) sets the angular/linear position of a joint that is not in force/torque mode. The joint will instantaneously jump into position.
sim.setJointTargetPosition (or simxSetJointTargetPosition) sets the desired angular/linear position of a joint that is in force/torque mode, and that has its controller enabled. The joint will gradually try to reach the desired position.

Cheers

Post Reply