Zivid CLI Tool For Hand-Eye Calibration

This tutorial shows how to use the Command Line Interface (CLI) tool for Hand-Eye calibration. Step by step instructions are provided with screenshots below.

참고

로봇 포즈에 *.yaml 파일 형식을 사용하는 ZividExperimentalHandEyeCalibration.exe CLI 도구는 experimental 입니다. 이 기능은 추후에 GUI로 대체될 것입니다.

Requirements

Instructions

Acquire the dataset

Hand-Eye Calibration 에 대한 자세한 튜토리얼을 읽지 않으셨다면 읽어보시기 바랍니다. 데이터 세트를 획득하기 위한 최소한의 요구는 Hand-Eye Calibration Process 를 확인하여 필요한 로봇 포즈에 대해 자세히 알아보고 How To Get Good Quality Data On Zivid Calibration Object 을 배우는 것입니다. 또한, Cautions And Recommendations 을 읽는 것도 매우 도움이 될 수 있습니다.

The dataset assumes 10 - 20 pairs of Zivid calibration object point clouds in .zdf file format and corresponding robot poses in .yaml file format. The naming convention is:

  • Point clouds: img01.zdf, img02.zdf, img03.zdf 등

  • Robot poses: pos01.yaml, pos02.yaml, pos03.yaml 등

조심

로봇 포즈의 변환 부분은 mm 단위여야 합니다.

The CLI tool works with Zivid checkerboards or ArUco markers. However, unlike the SDK, the CLI tool works with a single ArUco marker dictionary only: DICT_4X4_50.

다음은 다운로드할 수 있는 로봇 포즈의 예입니다. - pos01.yaml . .yaml 형식으로 파일을 쓰고 읽는 방법을 배우려면 OpenCV YAML file storage class 를 확인하십시오. 데이터세트 폴더는 다음과 유사해야 합니다.

조심

Robot pose files are in .yaml file format, unlike camera settings and configuration files which are in .yml file format.

../../../_images/hand-eye-dataset-in-explorer-screenshot.png

Run the hand-eye calibration CLI tool

키보드에서 Win + R 키를 눌러 명령 프롬프트를 시작한 다음 cmd 을 입력하고 Enter 를 누릅니다.

../../../_images/run-cmd-windows.png

Zivid 소프트웨어를 설치한 폴더로 이동합니다.

cd C:\Program Files\Zivid\bin>
../../../_images/cmd_zivid_folder.png

ZividExperimentalHandEyeCalibration.exe 의 입력 및 출력입니다. CLI 도구에 다음 명령을 입력하여 표시할 수 있습니다.

ZividExperimentalHandEyeCalibration.exe -h
../../../_images/hand_eye_cmd_help.png

ZividExperimentalHandEyeCalibration.exe CLI 도구를 실행하려면 다음을 지정해야 합니다.

  • 칼리브레이션 유형(eye-in-hand or eye-to-hand)

  • The path to the directory containing the dataset (.zdf files and .yaml robot poses)

결과 핸드-아이 칼리브레이션 및 잔차를 저장할 위치를 지정하는 것도 편리합니다. 아래 예를 참조하십시오.

SET dataset=C:\Users\Public\Documents\Directory_where_dataset_is_located
ZividExperimentalHandEyeCalibration.exe --eth -d "%dataset%" --tf "%dataset%\transform.yaml" --rf "%dataset%\residuals.yaml"
  • 칼리브레이션 유형(eye-in-hand or eye-to-hand)

  • The path to the directory containing the dataset (.zdf files and .yaml robot poses)

  • The IDs of the ArUco markers used

결과 핸드-아이 칼리브레이션 및 잔차를 저장할 위치를 지정하는 것도 편리합니다. 아래 예를 참조하십시오.

SET dataset=C:\Users\Public\Documents\Directory_where_dataset_is_located
ZividExperimentalHandEyeCalibration.exe --eth -d "%dataset%" --tf "%dataset%\transform.yaml" --rf "%dataset%\residuals.yaml" --ids 1, 2, 3

During the execution, the algorithm outputs (“OK”) if it can detect the calibration object or (“FAILED”) if it cannot. After the detection phase, it outputs the resulting hand-eye transform (4x4 homogeneous transformation matrix). Lastly, it outputs Hand-Eye Calibration Residuals for every pose; see the example output below.

../../../_images/hand_eye_cmd_results.png

The resulting homogeneous transformation matrix (eyeInHandTransform.yaml) can then be used to transform the picking point coordinates or the entire point cloud from the camera frame to the robot base frame. To learn how to do this, check out How To Use The Result Of Hand-Eye Calibration.