From 59c38f3453becfc04cc37fa9ed9bda01307eb1be Mon Sep 17 00:00:00 2001 From: v4hn Date: Thu, 20 Oct 2022 09:36:05 +0900 Subject: [PATCH 1/3] do away with boost::bind literal boost _1 has been deprecated for a long time due to std::bind. Using lambas instead is strongly encouraged. --- libuvc_camera/src/camera_driver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libuvc_camera/src/camera_driver.cpp b/libuvc_camera/src/camera_driver.cpp index aa4abce..24ab7ef 100644 --- a/libuvc_camera/src/camera_driver.cpp +++ b/libuvc_camera/src/camera_driver.cpp @@ -78,7 +78,7 @@ bool CameraDriver::Start() { state_ = kStopped; - config_server_.setCallback(boost::bind(&CameraDriver::ReconfigureCallback, this, _1, _2)); + config_server_.setCallback([this](auto& config, auto level){ ReconfigureCallback(config, level); }); return state_ == kRunning; } From 2b187b0282a46a460d3ace9e30f0079562aa04a9 Mon Sep 17 00:00:00 2001 From: v4hn Date: Thu, 20 Oct 2022 09:36:53 +0900 Subject: [PATCH 2/3] adapt pluginlib header *.h includes have been deprecated for a long time. --- libuvc_camera/src/nodelet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libuvc_camera/src/nodelet.cpp b/libuvc_camera/src/nodelet.cpp index 91d2f3c..38246d8 100644 --- a/libuvc_camera/src/nodelet.cpp +++ b/libuvc_camera/src/nodelet.cpp @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. *********************************************************************/ #include -#include +#include #include #include "libuvc_camera/camera_driver.h" From f63727aae268af887f4e086c702e8935ab602dc0 Mon Sep 17 00:00:00 2001 From: v4hn Date: Wed, 26 Jun 2024 13:19:00 +0200 Subject: [PATCH 3/3] support modern libuvc cmake target Required in libuvc 0.0.7. --- libuvc_camera/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libuvc_camera/CMakeLists.txt b/libuvc_camera/CMakeLists.txt index 91db504..48f281c 100644 --- a/libuvc_camera/CMakeLists.txt +++ b/libuvc_camera/CMakeLists.txt @@ -7,7 +7,13 @@ find_package(catkin REQUIRED COMPONENTS roscpp camera_info_manager dynamic_recon generate_dynamic_reconfigure_options(cfg/UVCCamera.cfg) find_package(libuvc REQUIRED) -message(STATUS "libuvc ${libuvc_VERSION_MAJOR}.${libuvc_VERSION_MINOR}.${libuvc_VERSION_PATCH}") +# if libuvc_LIBRARIES are empty, check cmake target +if(NOT libuvc_LIBRARIES AND TARGET LibUVC::UVCShared) + set(libuvc_LIBRARIES LibUVC::UVCShared) +endif() +if(NOT libuvc_LIBRARIES) + message(FATAL_ERROR "could not find expected libuvc libraries in package") +endif() catkin_package( CATKIN_DEPENDS