Regular API function

simGetJointPosition / sim.getJointPosition (remote API equivalent: simxGetJointPosition)

Description Retrieves the intrinsic position of a joint. This function cannot be used with spherical joints (use sim.getJointMatrix instead). See also sim.setJointPosition.
C synopsis simInt simGetJointPosition(simInt objectHandle,simFloat* position)
C parameters
objectHandle: handle of the joint
position: intrinsic position of the joint. This is a one-dimensional value: if the joint is revolute, the rotation angle is returned, if the joint is prismatic, the translation amount is returned, etc.
C return value
-1 if operation was not successful. In a future release, a more differentiated return value might be available
Lua synopsis number position=sim.getJointPosition(number objectHandle)
Lua parameters
objectHandle: handle of the joint
Lua return values
position: intrinsic position of the joint or nil in case of an error

All regular API functions on one page