From de864ccc51bfcc1e252ad33fd3757a3c70f961be Mon Sep 17 00:00:00 2001 From: FilippoGuarda Date: Thu, 9 Nov 2023 11:00:52 +0100 Subject: [PATCH] patch api attribute error the last update of cv2 has introduced API changes that result in error "AttributeError: module 'cv2.aruco' has no attribute 'Dictionary_get'", this commit brings back API compatibility with regards to dictionary and parameters values --- ros2_aruco/ros2_aruco/aruco_node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ros2_aruco/ros2_aruco/aruco_node.py b/ros2_aruco/ros2_aruco/aruco_node.py index 2fe85ec..d8c8fbf 100644 --- a/ros2_aruco/ros2_aruco/aruco_node.py +++ b/ros2_aruco/ros2_aruco/aruco_node.py @@ -145,8 +145,8 @@ def __init__(self): self.intrinsic_mat = None self.distortion = None - self.aruco_dictionary = cv2.aruco.Dictionary_get(dictionary_id) - self.aruco_parameters = cv2.aruco.DetectorParameters_create() + self.aruco_dictionary = cv2.aruco.getPredefinedDictionary(dictionary_id) + self.aruco_parameters = cv2.aruco.DetectorParameters() self.bridge = CvBridge() def info_callback(self, info_msg):