정의
coord_transform(pose_in, ref_in, ref_out, ori_type_out)
기능
‘ref_in’ 기준 좌표계에서 표현되는 ‘pose_in’ Task 좌표를 ‘ref_out’ 기준 좌표계에서 표현되는 Task 좌표로 변환하여, 출력합니다. 아래의 경우에 대한 좌표변환 계산을 지원합니다.
-
(ref_in) 월드 기준 좌표계 → (ref_out) 월드 기준 좌표계
-
(ref_in) 월드 기준 좌표계 → (ref_out) 베이스 기준 좌표계
-
(ref_in) 월드 기준 좌표계 → (ref_out) 툴 기준 좌표계
-
(ref_in) 월드 기준 좌표계 → (ref_out) 사용자 기준 좌표계
-
(ref_in) 베이스 기준 좌표계 → (ref_out) 월드 기준 좌표계
-
(ref_in) 베이스 기준 좌표계 → (ref_out) 베이스 기준 좌표계
-
(ref_in) 베이스 기준 좌표계 → (ref_out) 툴 기준 좌표계
-
(ref_in) 베이스 기준 좌표계 → (ref_out) 사용자 기준 좌표계
-
(ref_in) 툴 기준 좌표계 → (ref_out) 월드 기준 좌표계
-
(ref_in) 툴 기준 좌표계 → (ref_out) 베이스 기준 좌표계
-
(ref_in) 툴 기준 좌표계 → (ref_out) 툴 기준 좌표계
-
(ref_in) 툴 기준 좌표계 → (ref_out) 사용자 기준 좌표계
-
(ref_in) 사용자 기준 좌표계 → (ref_out) 월드 기준 좌표계
-
(ref_in) 사용자 기준 좌표계 → (ref_out) 베이스 기준 좌표계
-
(ref_in) 사용자 기준 좌표계 → (ref_out) 툴 기준 좌표계
-
(ref_in) 사용자 기준 좌표계 → (ref_out) 사용자 기준 좌표계
인수
|
인수명 |
자료형 |
기본값 |
설명 |
|---|---|---|---|
|
pose_in |
posx |
- |
posx |
|
ref_in |
float |
DR_COND_NONE |
변환 전 reference coordinate
|
|
ref_out |
float |
DR_COND_NONE |
변환 후 reference coordinate
|
|
ori_type_out |
int |
None |
orientation type
|
리턴
|
값 |
설명 |
|---|---|
|
pos |
posx or pose |
예외
|
예외 |
설명 |
|---|---|
|
DR_Error (DR_ERROR_TYPE) |
인수들의 데이터형 오류 시 |
|
DR_Error (DR_ERROR_VALUE) |
인수의 값이 유효하지 않을 시 |
|
DR_Error (DR_ERROR_RUNTIME) |
C Extension 모듈 에러 발생 시 |
|
DR_Error (DR_ERROR_STOP) |
프로그램 강제 종료 시 |
예제
base_pos = posx(400,500,800,0,180,15)
# 베이스 기준의 Task 좌표가 base_pos = posx(400,500,800,0,180,15) 인 경우
tool_pos = coord_transform(base_pos, DR_BASE, DR_TOOL)
# 베이스 기준의 Task 좌표인 base_pos를 툴 기준의 Task 좌표로 변환
# 상기 명령어는 변환된 툴 기준의 Task 좌표를 리턴 하며 tool_pos에 저장
tool_pos_zyx = coord_transform(base_pos, DR_BASE, DR_TOOL, DR_ELR_ZYX)
# Orientation type of tool_pos_zyx: euler zyx