In case my script for calculating the transform between the gripper and the camera has some bug, I have also uploaded my dataset here: eye_in_hand_calib_data - Google Drive
. Could anyone run through my data with his/her code to see if we could get the same result or not?
You could get the transforms from the json file with this piece of code:
filename = "data/data_extrinsic.json"
axes = 'sxyz'
with open(filename, "r") as json_file:
loaded_data = json.load(json_file)
# Now, 'loaded_data' contains the data from the JSON file as a Python dictionary
rmat_all_grip_to_base_json = np.asarray(loaded_data['rmat_all_grip_to_base'])
tvec_all_grip_to_base_json = np.asarray(loaded_data['tvec_all_grip_to_base'])
T_all_grip_to_base_json = np.asarray(loaded_data['T_all_grip_to_base'])
#######################
# rmat_all_grip_to_work = np.asarray(loaded_data['rmat_all_grip_to_work'])
# tvec_all_grip_to_work = np.asarray(loaded_data['tvec_all_grip_to_work'])
# T_all_grip_to_work = np.asarray(loaded_data['T_all_grip_to_work'])
rmat_all_chess_to_cam_json = np.asarray(loaded_data['rmat_all_chess_to_cam'])
tvec_all_chess_to_cam_json = np.asarray(loaded_data['tvec_all_chess_to_cam'])
T_all_chess_to_cam_json = np.asarray(loaded_data['T_all_chess_to_cam'])
R,T=cv.calibrateHandEye(rmat_all_grip_to_base_json,tvec_all_grip_to_base_json,rmat_all_chess_to_cam_json,tvec_all_chess_to_cam_json)
print(R)
print(T)