Regular API function

simSetJointTargetPosition / sim.setJointTargetPosition

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 sim.getJointTargetPosition and sim.setJointPosition.
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=sim.setJointTargetPosition(number objectHandle,number targetPosition)
Lua parameters
Same as C-function
Lua return values
Same as C-function
Remote API equiv.
B0-based remote API: simxSetJointTargetPosition
Legacy remote API: simxSetJointTargetPosition

All regular API functions on one page