3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish
3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.2 3.2.1 3.2.0 Korean English Chinese Czech Dutch French German Hungarian Italian Japanese Polish Portuguese Spanish

coord_transform()

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

  • DR_BASE : base coordinate

  • DR_WORLD : world coordinate

  • DR_TOOL : tool coordinate

  • user coordinate: User defined

ref_out

float

DR_COND_NONE

reference coordinate after transformation

  • DR_BASE : base coordinate

  • DR_WORLD  world coordinate

  • DR_TOOL : tool coordinate

  • user coordinate: User defined

ori_type_out

int

None

orientation type

  • None: Follows the orientation type of pos_in input parameter

  • DR_ELR_ZYZ: Euler Angles(z-y'-z'', in degrees)

  • DR_ELR_ZYX: Euler Angles(z-y'-x'', in degrees)

  • DR_ELR_XYZ: Euler Angles(x-y'-z'', in degrees)

  • DR_FIX_XYZ: Fixed Angles(x-y-z, in degrees)

  • DR_ROTVEC: 3D rotation vector (angle/axis representation, in degrees)

  • DR_QUAT: unit quaternion(x, y, z, w)

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

Python
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

Keyword

coord / transform / coord_