From f3c77328e8f5922b6cd9d3336cb6a67bcaf34ea3 Mon Sep 17 00:00:00 2001 From: Kazadhum Date: Sun, 5 May 2024 19:22:42 +0100 Subject: [PATCH] now correctly verifies if the hand link is in the chain from the pattern to the base (#943) --- .../scripts/other_calibrations/cv_eye_to_hand.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/atom_evaluation/scripts/other_calibrations/cv_eye_to_hand.py b/atom_evaluation/scripts/other_calibrations/cv_eye_to_hand.py index f51fa3d0..5a0c260f 100755 --- a/atom_evaluation/scripts/other_calibrations/cv_eye_to_hand.py +++ b/atom_evaluation/scripts/other_calibrations/cv_eye_to_hand.py @@ -111,11 +111,9 @@ def main(): elif args['method_name'] == 'daniilidis': method = cv2.CALIB_HAND_EYE_DANIILIDIS - # Check if the hand link is in the chain from the base to the pattern - - # TODO: try/except here because the pattern might not be in this chain and an atomError message is clearer than the networkX exception error message + # Check if the hand link is in the chain from the base to the pattern (since transforms involving the pattern aren't included in the transformation pool in the collections, it uses the pattern's parent link for the check) chain = getChain(from_frame=args['base_link'], - to_frame=dataset['calibration_config']['calibration_patterns'][args['pattern']]['link'], + to_frame=dataset['calibration_config']['calibration_patterns'][args['pattern']]['parent_link'], transform_pool=dataset['collections'][selected_collection_key]['transforms']) hand_frame_in_chain = False