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()

정의

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

기능

  • ref 좌표계 기준으로 정의된 pos(포즈)를 동일 좌표계를 기준으로 delta만큼 이동/회전하여 ref_out 좌표계 기준으로 변환한 후 리턴합니다.

  • 단, ref 인자가 Tool Coordinate인 경우, ref_out인자는 무시되며 pos와 동일한 좌표계 기준의 결과를 리턴합니다.

인수

인수명

자료형

기본값

설명

pos

posx

-

posx 또는

position list

list (float[6])

delta

posx

-

posx 또는

position list

list (float[6])

ref

int

None

reference coordinate

  • DR_BASE : base coordinate

  • DR_WORLD : world coordinate

  • DR_TOOL : tool coordinate

  • user coordinate: 사용자 정의

ref_out

int

DR_BASE

reference coordinate

  • DR_BASE : base coordinate

  • DR_WORLD : world coordinate

  • user coordinate: 사용자 정의

ori_type_out

int

None

output orientation type

  • None: pos 인자의 orientation type을 따름.

  • 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)

리턴

설명

posx

task space point

예외

예외

설명

DR_Error (DR_ERROR_TYPE)

인수들의 데이터형 오류 시

DR_Error (DR_ERROR_VALUE)

인수의 값이 유효하지 않을 시

DR_Error (DR_ERROR_RUNTIME)

C Extension 모듈 에러 발생 시

DR_Error (DR_ERROR_STOP)

프로그램 강제 종료 시

예제

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) #사용자 정의 좌표계 등록

x1_userTC1 = posx(30, 20, 100, 0, 180, 0)        #사용자좌표계 상의 posx

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

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

관련 명령어