5. 툴 핸드 캘리브레이션
1, 캘리브레이션할 툴 핸드 번호 설정
cpp
int toolNum = 3; //툴 핸드 번호
set_tool_hand_number(fd, 1);2, 로봇을 캘리브레이션할 포인트로 이동한 후 포인트 표시
tool_hand_7_point_calibrate(fd, i, toolNum);// i는 표시할 위치 번호이며, 7포인트 캘리브레이션에서 i의 범위는 [1,7]
3, 7개 포인트를 모두 표시한 후 캘리브레이션 결과 계산
cpp
tool_hand_7_point_calibrate_caculate(fd, toolNum, 7);7포인트 캘리브레이션 예시:
cpp
int toolNum = 3; //툴 핸드 번호
set_tool_hand_number(fd, toolNum);
for(int i = 1; i < 8; i++)
{
sleep(5); //로봇이 캘리브레이션 포인트로 이동할 때까지 대기
tool_hand_7_point_calibrate(fd, i, toolNum);
printf("%d번째 포인트 캘리브레이션\n", i);
}
//포인트 캘리브레이션 완료 후 캘리브레이션 결과를 계산해야 함
tool_hand_7_point_calibrate_caculate(fd, toolNum, 7);20포인트 캘리브레이션 예시:
cpp
int toolNum = 4; //툴 핸드 번호
set_tool_hand_number(fd, toolNum);
for(int i = 1; i < 21; i++)
{
sleep(3); //로봇이 캘리브레이션 포인트로 이동할 때까지 대기
tool_hand_2_or_20_point_calibrate(fd, i);
printf("%d번째 포인트 캘리브레이션\n", i);
}
//포인트 캘리브레이션 완료 후 캘리브레이션 결과를 계산해야 함
tool_hand_2_or_20_point_calibrate_caculate(fd, toolNum, false);