diff options
Diffstat (limited to 'aruco-markers.spec')
| -rw-r--r-- | aruco-markers.spec | 45 |
1 files changed, 2 insertions, 43 deletions
diff --git a/aruco-markers.spec b/aruco-markers.spec index 64e7b7a..8aa8a61 100644 --- a/aruco-markers.spec +++ b/aruco-markers.spec @@ -4,7 +4,7 @@ Name: ros-%{ros_distro}-%{RosPkgName} Version: 0.0.3 -Release: 3%{?dist} +Release: 1%{?dist} Summary: A ros2 node for detecting aruco markers in camera images License: MIT URL: https://github.com/namo-robotics/aruco_markers/tree/humble @@ -46,38 +46,6 @@ A ros2 node for detecting aruco markers in camera images %prep %autosetup -n %{RosPkgName}-%{src_version} -# OpenCV 4.5.x API 兼容性修复: -# 1. opencv2/aruco/dictionary.hpp 是 4.6+ 新路径,4.5.x 统一在 opencv2/aruco.hpp -sed -i 's|#include <opencv2/aruco/dictionary\.hpp>|#include <opencv2/aruco.hpp>|g' \ - aruco_markers/include/aruco_markers/utils.hpp -# 2. PREDEFINED_DICTIONARY_NAME 在 4.5.x 中是匿名枚举(底层 int),不能作为类型名 -sed -i 's|cv::aruco::PREDEFINED_DICTIONARY_NAME|int|g' \ - aruco_markers/include/aruco_markers/utils.hpp \ - aruco_markers/include/aruco_markers/aruco_markers.hpp \ - aruco_markers/src/utils.cpp -# 3. DetectorParameters::create() 在 4.5.x 中不存在,使用 cv::makePtr 构造 -sed -i 's|cv::aruco::DetectorParameters::create()|cv::makePtr<cv::aruco::DetectorParameters>()|g' \ - aruco_markers/src/aruco_markers.cpp -# 4. detectMarkers 4.5.x 签名无 camera_matrix/camera_distortion 参数(后两个可选参数已移除) -python3 -c " -import re, sys -src = open('aruco_markers/src/aruco_markers.cpp').read() -src = re.sub( - r'cv::aruco::detectMarkers\(\s*image,\s*aruco_dict_,\s*marker_corners,\s*marker_ids,\s*aruco_parameters_,\s*rejected_candidates,\s*camera_matrix_,\s*camera_distortion_\);', - 'cv::aruco::detectMarkers(\n image, aruco_dict_, marker_corners, marker_ids, aruco_parameters_,\n rejected_candidates);', - src) -open('aruco_markers/src/aruco_markers.cpp', 'w').write(src) -" -# 5. drawAxis 在 4.5.x 中已更名为 drawFrameAxes -python3 -c " -import re, sys -src = open('aruco_markers/src/aruco_markers.cpp').read() -src = re.sub( - r'cv::aruco::drawAxis\(\s*image,\s*camera_matrix_,\s*camera_distortion_,\s*rvec,\s*tvec,\s*marker_size_\s*\*\s*0\.7f\);', - 'cv::aruco::drawFrameAxes(\n image, camera_matrix_, camera_distortion_, rvec, tvec,\n marker_size_ * 0.7f);', - src) -open('aruco_markers/src/aruco_markers.cpp', 'w').write(src) -" %build source /opt/ros/%{ros_distro}/setup.sh 2>/dev/null || true @@ -107,14 +75,5 @@ make install DESTDIR=%{buildroot} /opt/ros/%{ros_distro} %changelog -* Fri Sep 19 2026 ai-importer <ai-importer@openeuler.org> - 0.0.3-3 -- Fix full OpenCV 4.5.x API incompatibilities: replace PREDEFINED_DICTIONARY_NAME - type usage with int, DetectorParameters::create() with cv::makePtr, remove - extra detectMarkers args, replace drawAxis with drawFrameAxes - -* Fri Sep 19 2026 ai-importer <ai-importer@openeuler.org> - 0.0.3-2 -- Fix build failure: replace opencv2/aruco/dictionary.hpp with opencv2/aruco.hpp - to be compatible with OpenCV 4.5.x available in openEuler 24.03 LTS SP3 - -* Fri Sep 19 2026 ai-importer <ai-importer@openeuler.org> - 0.0.3-1 +* Sun Sep 20 2026 ai-importer <ai-importer@openeuler.org> - 0.0.3-1 - Initial import (ROS batch) |
