zivid / zivid-python

Official Python package for Zivid 3D cameras
BSD 3-Clause "New" or "Revised" License
40 stars 14 forks source link

eye_in_hand calibration example #264

Closed belalhmedan90 closed 2 months ago

belalhmedan90 commented 3 months ago

Hi,

Can you please provide an example of how to do sample_calibrate_eye_in_hand? I saw this sample_calibrate_eye_to_hand, but I didn't understand well what should I provide as a HandEyeInput to change it to calibrate_eye_in_hand, can you please provide a sample on how to do that? thanks in advance.

eskaur commented 2 months ago

Hi! We have a separate repository for more advanced samples and tutorials. I believe you may find what you need there: https://github.com/zivid/zivid-python-samples

belalhmedan90 commented 2 months ago

Hi! We have a separate repository for more advanced samples and tutorials. I believe you may find what you need there: https://github.com/zivid/zivid-python-samples

Thanks for your kind reply, I didn't find an example of hand-in-eye calibration there also, can you please refer to the the script that contains that part? thanks.

ajlandau commented 2 months ago

Hi! When you perform hand-eye calibration through the Zivid interface you will set the type of calibration you are doing with either: eih hand_eye_output = zivid.calibration.calibrate_eye_to_hand(hand_eye_input) or eth zivid.calibration.calibrate_eye_in_hand(hand_eye_input) and you can find that here: hand-eye-calibration.py lines 49-59

Both eye-to-hand and eye-in-hand expect the same type of calibration inputs, so the code is basically the same besides setting which type of calibration you are doing. The expected inputs for both are:

The section lines 101-126 then uses the frame to find detection points for hand-eye and pairs them to the robot pose you give: (zivid.calibration.HandEyeInput(robot_pose, detection_result)