Definition
fkin(pos, ref, ori_type)
Features
This function receives the input data of joint angles or equivalent forms (float[6]) in the joint space and returns the TCP (objects in the task space) based on the ref coordinate.
Parameters
|
Parameter Name |
Data type |
Default Value |
Description |
|
pos |
posj |
- |
posj or position list |
|
list (float[6]) |
|||
|
ref |
int |
DR_BASE |
reference coordinate
|
|
ori_type |
int |
DR_ELR_ZYZ |
orientation type
|
Return
|
Value |
Description |
|---|---|
|
posx |
Task space point |
Exception
|
Exception |
Description |
|---|---|
|
DR_Error (DR_ERROR_TYPE) |
Parameter data type error occurred |
|
DR_Error (DR_ERROR_VALUE) |
Parameter value is invalid |
|
DR_Error (DR_ERROR_RUNTIME) |
C extension module error occurred |
Example
q1 = posj(0, 0, 90, 0, 90, 0)
movej(q1,v=10,a=20)
q2 = posj(30, 0, 90, 0, 90, 0)
x2 = fkin(q2, DR_WORLD) # x2: Space coordinate at the edge of the robot (TCP) corresponding to joint value q2
movel(x2,v=100,a=200,ref=DR_WORLD) # Linear motion to x2
x1 = fkin(q1, DR_WORLD, DR_ELR_XYZ) # x1: Space coordinate at the edge of the robot (TCP) corresponding to joint value q2 (orientation type: euelr xyz)
movel(x1,v=100,a=200,ref=DR_WORLD) # Linear motion to x1