Regular API function

simSetJointTargetPosition
remote API equivalent: simxSetJointTargetPosition
RosPlugin API equivalent: simRosSetJointTargetPosition

Description Sets the target position of a joint if the joint is in torque/force mode (also make sure that the joint's motor and position control are enabled). See also simGetJointTargetPosition and simSetJointPosition.
C synopsis simInt simSetJointTargetPosition(simInt objectHandle,simFloat targetPosition)
C parameters
objectHandle: handle of the joint object
targetPosition: target position of the joint (angular or linear value depending on the joint type)
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis number result=simSetJointTargetPosition(number objectHandle,number targetPosition)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page