Skip to content

Commit

Permalink
tooling: Fix building v4l2_camera on Iron
Browse files Browse the repository at this point in the history
  • Loading branch information
eigendude committed Dec 2, 2023
1 parent 17cf120 commit 286fb54
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
30 changes: 30 additions & 0 deletions oasis_tooling/config/ros2_v4l2_camera/0001-Fix-include-path.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 7524a550d726a39609346e56acf91646f1d6d728 Mon Sep 17 00:00:00 2001
From: Garrett Brown <[email protected]>
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 <cv_bridge/cv_bridge.h>
| ^~~~~~~~~~~~~~~~~~~~~~~
---
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 <cv_bridge/cv_bridge.h>
+#include <cv_bridge/cv_bridge.hpp>

#include <algorithm>
#include <memory>
--
2.34.1

10 changes: 10 additions & 0 deletions oasis_tooling/scripts/depinstall_oasis_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,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
Expand Down

0 comments on commit 286fb54

Please sign in to comment.