Skip to content

Commit b1ca812

Browse files
authored
Merge pull request #315 from elephantum/feat/enable-usb-cam
2 parents e4fddc2 + 2526c60 commit b1ca812

File tree

3 files changed

+26
-22
lines changed

3 files changed

+26
-22
lines changed

patch/ros-humble-usb-cam.patch

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
diff --git a/CMakeLists.txt b/CMakeLists.txt
2-
index 6c7abf3..3737f94 100644
2+
index 2387c32..0413704 100644
33
--- a/CMakeLists.txt
44
+++ b/CMakeLists.txt
5-
@@ -15,8 +15,8 @@ ament_auto_find_build_dependencies()
5+
@@ -8,7 +8,7 @@ endif()
66

7-
## pkg-config libraries
8-
find_package(PkgConfig REQUIRED)
9-
-pkg_check_modules(avcodec libavcodec REQUIRED)
10-
-pkg_check_modules(swscale libswscale REQUIRED)
11-
+pkg_search_module(avcodec libavcodec REQUIRED)
12-
+pkg_search_module(swscale libswscale REQUIRED)
7+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
8+
if($ENV{ROS_VERSION} EQUAL 2)
9+
- add_compile_options(-Wall -Wextra -Wpedantic -Werror)
10+
+ add_compile_options(-Wall -Wextra -Wpedantic)
11+
endif()
12+
endif()
1313

14-
include_directories(include
15-
${avcodec_INCLUDE_DIRS}
16-
@@ -35,8 +35,8 @@ ament_auto_add_library(${PROJECT_NAME}_node SHARED
14+
diff --git a/include/usb_cam/formats/av_pixel_format_helper.hpp b/include/usb_cam/formats/av_pixel_format_helper.hpp
15+
index ad1792e..1ea720d 100644
16+
--- a/include/usb_cam/formats/av_pixel_format_helper.hpp
17+
+++ b/include/usb_cam/formats/av_pixel_format_helper.hpp
18+
@@ -744,11 +744,6 @@ const std::unordered_map<std::string, AVPixelFormat> STR_2_AVPIXFMT = {
19+
///< big-endian
1720

18-
target_link_libraries(${PROJECT_NAME}_node
19-
${PROJECT_NAME}
20-
- ${avcodec_LIBRARIES}
21-
- ${swscale_LIBRARIES}
22-
+ ${avcodec_LINK_LIBRARIES}
23-
+ ${swscale_LINK_LIBRARIES}
24-
# TODO(lucasw) should this have been in libavcodec?
25-
#avutil
26-
)
21+
22+
- {stringify(AV_PIX_FMT_XVMC), AV_PIX_FMT_XVMC}, ///< XVideo Motion
23+
- ///< Acceleration via common
24+
- ///< packet passing
25+
-
26+
-
27+
{stringify(AV_PIX_FMT_YUV440P10LE), AV_PIX_FMT_YUV440P10LE}, ///< planar YUV 4:4:0,20bpp,
28+
///< (1 Cr & Cb sample per
29+
///< 1x2 Y samples),

vinca_linux_64.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ packages_select_by_deps:
263263
# Phidgets packages
264264
- topic_tools
265265

266+
- usb_cam
266267
# ----- end of package support -----
267268

268269
# - rtabmap
@@ -282,7 +283,6 @@ packages_select_by_deps:
282283
# - gscam
283284

284285
# - v4l2_camera
285-
# - usb_cam
286286

287287
# - zbar_ros
288288
# - vitis_common

vinca_linux_aarch64.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ packages_select_by_deps:
189189

190190
- topic_tools
191191

192+
- usb-cam
193+
192194
# Used to work, now needs fixes
193195
# - rtabmap
194196
# - webots-ros2
@@ -236,7 +238,6 @@ packages_select_by_deps:
236238
# - plansys2-bringup
237239
# - octovis
238240
# - gps-umd
239-
# - usb-cam
240241
# - tvm-vendor
241242
# - ros2-socketcan
242243
# - mrpt2

0 commit comments

Comments
 (0)