Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion distros/noetic/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ libopencolorio:
libopenimageio:
- '3.2'
libopencv:
- 4.13.0
- 5.0.0
libopentelemetry_cpp:
- '1.27'
libosqp:
Expand Down
3 changes: 0 additions & 3 deletions distros/noetic/distro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,3 @@ rosdistro_sync: manual
pinning_overrides:
# rviz 1.14 (and Gazebo 11) use Ogre 1.10's API (SceneManagerEnumerator, ...)
ogre: [1.10.12]
# OpenCV 5 drops the C API (CV_BGR2GRAY, opencv2/imgproc/types_c.h, ...) and moves calib3d,
# which ROS 1 code uses throughout; 4.13 is the newest OpenCV 4 and solves with the rest
libopencv: [4.13.0]
21 changes: 21 additions & 0 deletions distros/noetic/patch/ros-noetic-apriltag-ros.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
diff --git a/src/common_functions.cpp b/src/common_functions.cpp
index d7da739..90da98c 100644
--- a/src/common_functions.cpp
+++ b/src/common_functions.cpp
@@ -41,6 +41,7 @@
#include "tagCustom48h12.h"
#include "tagCircle21h7.h"
#include "tagCircle49h12.h"
+#include <opencv2/calib3d.hpp>

namespace apriltag_ros
{
@@ -211,7 +212,7 @@ AprilTagDetectionArray TagDetector::detectTags (
}
else
{
- cv::cvtColor(image->image, gray_image, CV_BGR2GRAY);
+ cv::cvtColor(image->image, gray_image, cv::COLOR_BGR2GRAY);
}
image_u8_t apriltag_image = { .width = gray_image.cols,
.height = gray_image.rows,
38 changes: 18 additions & 20 deletions distros/noetic/patch/ros-noetic-aruco-ros.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d8b818..d313db7 100644
index 98c2609..23726f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,7 +21,7 @@ generate_dynamic_reconfigure_options(
@@ -1,7 +1,6 @@
cmake_minimum_required(VERSION 2.8.3)
project(aruco_ros)

-find_package(OpenCV REQUIRED)

find_package(catkin REQUIRED COMPONENTS
cv_bridge
@@ -16,12 +15,14 @@ find_package(catkin REQUIRED COMPONENTS
sensor_msgs
visualization_msgs
)
+# RoboStack: after catkin, whose find_package maps calib3d to OpenCV 5 components
+find_package(OpenCV REQUIRED COMPONENTS core imgproc calib3d)

generate_dynamic_reconfigure_options(
cfg/ArucoThreshold.cfg
)

Expand All @@ -11,24 +26,7 @@ index 4d8b818..d313db7 100644

catkin_package(
INCLUDE_DIRS include
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d8b818..e2c5e99 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8.3)
project(aruco_ros)

-find_package(OpenCV REQUIRED)
+find_package(OpenCV REQUIRED COMPONENTS core imgproc calib3d)

find_package(catkin REQUIRED COMPONENTS
cv_bridge
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4d8b818..2738144 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,7 +35,7 @@ include_directories(
@@ -37,7 +38,7 @@ include_directories(
${OpenCV_INCLUDE_DIRS}
)
add_library(aruco_ros_utils src/aruco_ros_utils.cpp)
Expand Down
Loading
Loading