Definition
coord_transform(pose_in, ref_in, ref_out, ori_type_out)
Features
This function transforms given task position expressed in reference coordinate, ‘ref_in’ to task position expressed in reference coordinate, ‘ref_out’. It returns transformed task position. It supports calculation of coordinate transformation for the following cases.
-
(ref_in) world reference coordinate → (ref_out) world reference coordinate
-
(ref_in) world reference coordinate → (ref_out) base reference coordinate
-
(ref_in) world reference coordinate → (ref_out) tool reference coordinate
-
(ref_in) world reference coordinate → (ref_out) user reference coordinate
-
(ref_in) base reference coordinate → (ref_out) base reference coordinate
-
(ref_in) base reference coordinate → (ref_out) tool reference coordinate
-
(ref_in) base reference coordinate → (ref_out) user reference coordinate
-
(ref_in) tool reference coordinate → (ref_out) world reference coordinate
-
(ref_in) tool reference coordinate → (ref_out) base reference coordinate
-
(ref_in) tool reference coordinate → (ref_out) tool reference coordinate
-
(ref_in) tool reference coordinate → (ref_out) user reference coordinate
-
(ref_in) user reference coordinate → (ref_out) world reference coordinate
-
(ref_in) user reference coordinate → (ref_out) base reference coordinate
-
(ref_in) user reference coordinate → (ref_out) tool reference coordinate
-
(ref_in) user reference coordinate → (ref_out) user reference coordinate
Parameters
|
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
|
pose_in |
posx |
- |
posx |
|
ref_in |
float |
DR_COND_NONE |
reference coordinate before transformation
|
|
ref_out |
float |
DR_COND_NONE |
reference coordinate after transformation
|
|
ori_type_out |
int |
None |
orientation type
|
Return
|
Value |
Description |
|---|---|
|
pos |
posx |
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 |
|
DR_Error (DR_ERROR_STOP) |
Program terminated forcefully |
Example
base_pos = posx(400,500,800,0,180,15)
# If task position based on base reference coordinate base_pos = posx(400,500,800,0,180,15)
tool_pos = coord_transform(base_pos, DR_BASE, DR_TOOL)
# Transform task position(base_pos) expressed in base reference coordinate to task position expressed in tool reference coordinate
# This command returns task position expressed in tool reference coordinate and the result value is stored in tool_pos
tool_pos_zyx = coord_transform(base_pos, DR_BASE, DR_TOOL, DR_ELR_ZYX)
# Orientation type of tool_pos_zyx: euler zyx