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 » 24 Dec 2018, 03:19

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: 7450
Joined: 14 Dec 2012, 00:25

Re: API differences

Post by coppelia » 28 Dec 2018, 10:57

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 » 29 Dec 2018, 03:04

1)simxSetJointPosition
2)simxSetJointTargetPosition

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

Re: API differences

Post by coppelia » 02 Jan 2019, 13:57

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