From faf02386e81da89b7683f29383003671319eaad6 Mon Sep 17 00:00:00 2001 From: Garrett Brown Date: Sat, 2 Dec 2023 15:01:19 -0800 Subject: [PATCH] tooling: Fix building v4l2_camera on Iron --- .../0001-Fix-include-path.patch | 30 +++++++++++++++++++ .../scripts/depinstall_oasis_deps.sh | 10 +++++++ 2 files changed, 40 insertions(+) create mode 100644 oasis_tooling/config/ros2_v4l2_camera/0001-Fix-include-path.patch diff --git a/oasis_tooling/config/ros2_v4l2_camera/0001-Fix-include-path.patch b/oasis_tooling/config/ros2_v4l2_camera/0001-Fix-include-path.patch new file mode 100644 index 00000000..ba7366a3 --- /dev/null +++ b/oasis_tooling/config/ros2_v4l2_camera/0001-Fix-include-path.patch @@ -0,0 +1,30 @@ +From 7524a550d726a39609346e56acf91646f1d6d728 Mon Sep 17 00:00:00 2001 +From: Garrett Brown +Date: Fri, 1 Dec 2023 20:48:15 -0800 +Subject: [PATCH] Fix include path + +Error was: + + v4l2_camera.cpp:17:10: fatal error: cv_bridge/cv_bridge.h: No such file or directory + 17 | #include + | ^~~~~~~~~~~~~~~~~~~~~~~ +--- + src/v4l2_camera.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/v4l2_camera.cpp b/src/v4l2_camera.cpp +index a09767d..e507c39 100644 +--- a/src/v4l2_camera.cpp ++++ b/src/v4l2_camera.cpp +@@ -14,7 +14,7 @@ + + #include "v4l2_camera/v4l2_camera.hpp" + +-#include ++#include + + #include + #include +-- +2.34.1 + diff --git a/oasis_tooling/scripts/depinstall_oasis_deps.sh b/oasis_tooling/scripts/depinstall_oasis_deps.sh index 2b730cb3..e222660e 100755 --- a/oasis_tooling/scripts/depinstall_oasis_deps.sh +++ b/oasis_tooling/scripts/depinstall_oasis_deps.sh @@ -345,6 +345,16 @@ if [ "${ROS2_DISTRO}" = "humble" ]; then < "${CONFIG_DIRECTORY}/ros2_v4l2_camera/0001-Disable-Werror.patch" \ || : fi +if [ "${ROS2_DISTRO}" = "iron" ]; then + patch \ + -p1 \ + --forward \ + --reject-file="/dev/null" \ + --no-backup-if-mismatch \ + --directory="${OASIS_DEPENDS_SOURCE_DIRECTORY}/ros-perception/ros2_v4l2_camera" \ + < "${CONFIG_DIRECTORY}/ros2_v4l2_camera/0001-Fix-include-path.patch" \ + || : +fi # vision_opencv if [ "${ROS2_DISTRO}" = "humble" ]; then