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

trans()

Definition

trans(pos, delta, ref, ref_out, ori_type_out)

Features

  • pos (pose) defined based on the ref coordinate is moved/rotated by the amount equal to delta, and then a value converted based on the ref_out coordinate is returned.

  • In case that the ref coordinate is the tool coordinate, this function retuns the value based on input parameter(pos)’s coordinate without ref_out coordinate.

Parameters

Parameter Name

Data Type

Default Value

Description

pos

posx

-

posx or

position list

list (float[6])

delta

posx

-

posx or

position list

list (float[6])

ref

int

None

reference coordinate

  • DR_BASE : base coordinate

  • DR_WORLD : world coordinate

  • DR_TOOL : tool coordinate

  • user coordinate: user defined

ref_out

int

DR_BASE

reference coordinate

  • DR_BASE : base coordinate

  • DR_WORLD : world coordinate

  • user coordinate: user defined

ori_type_out

int

None

output orientation type

  • None: Follows the orientation type of input parameter(pos).

  • 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

posx list (float[6])

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

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

Python
p0 = posj(0,0,90,0,90,0)

movej(p0, v=30, a=30)

 

x1 = posx(200, 200, 200, 0, 180, 0)

delta = [100, 100, 100, 0, 0, 0]

x2 = trans(x1, delta, DR_BASE, DR_BASE)        # translation of x1 with delta in base coordinates

x3 = trans(x1, delta, ori_type_out=DR_ELR_ZYX) # transform to euler zyx 

x1_base = posx(500, 45, 700, 0, 180, 0)

x4 = trans(x1_base, [10, 0, 0, 0, 0, 0], DR_TOOL)

movel(x4, v=100, a=100, ref=DR_BASE)

 

uu1 = [1, 1, 0]

vv1 = [-1, 1, 0]

pos = posx(559, 34.5, 651.5, 0, 180.0, 0)

DR_userTC1 = set_user_cart_coord(uu1, vv1, pos)  #user defined coordinate system

x1_userTC1 = posx(30, 20, 100, 0, 180, 0)        #posx on user coordinate system

x9 = trans(x1_userTC1, [0, 0, 50, 0, 0, 0], DR_userTC1, DR_BASE) 

movel(x9, v=100, a=100, ref=DR_BASE)