Skip to content
Open
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
8 changes: 7 additions & 1 deletion libuvc_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions libuvc_camera/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<depend>camera_info_manager</depend>
<depend>dynamic_reconfigure</depend>
<depend>image_transport</depend>
<depend condition="$ROS_DISTRO != noetic">libuvc</depend>
<depend condition="$ROS_DISTRO == noetic">libuvc-dev</depend>
<depend>libuvc-dev</depend>
<depend>libusb-1.0-dev</depend>
<depend>nodelet</depend>
<depend>sensor_msgs</depend>

Expand Down
2 changes: 1 addition & 1 deletion libuvc_camera/src/camera_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion libuvc_camera/src/nodelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*********************************************************************/
#include <ros/ros.h>
#include <pluginlib/class_list_macros.h>
#include <pluginlib/class_list_macros.hpp>
#include <nodelet/nodelet.h>

#include "libuvc_camera/camera_driver.h"
Expand Down