get_inverse_kin(x, qnear, maxPositionError =1e-10,maxOrientationError =1e-10, tcp=’active_tcp’)
Calculate the inverse kinematic transformation (tool space -> joint space). If qnear is defined, the solution closest to qnear is returned.
Otherwise, the solution closest to the current joint positions is returned. If no tcp is provided the currently active tcp of the controller is used.
Parameters
x
: tool pose
qnear
: list of joint positions (Optional)
maxPositionError
: the maximum allowed position error (Optional)
maxOrientationError
: the maximum allowed orientation error (Optional)
tcp
: tcp offset pose (Optional)
Return Value
joint positions
Example command: get_inverse_kin(p[.1,.2,.2,0,3.14,0], [0.,3.14,1.57,.785,0,0])
- Example Parameters:
- x = p[.1,.2,.2,0,3.14,0] -> pose with position of x=100mm, y=200mm, z=200mm and rotation vector of rx=0 deg., ry=180 deg, rz=0 deg.
- qnear = [0.,3.14,1.57,.785,0,0] -> solution should be near to joint angles of j0=0 deg, j1=180 deg, j2=90 deg, j3=45 deg, j4=0 deg, j5=0 deg.
- maxPositionError is by default 1e-10 m
- maxOrientationError is by default 1e-10 rad