From 07daf95ed28dd8c3afa1ddba6afd95ed84c92cea Mon Sep 17 00:00:00 2001 From: Bartosz Meglicki Date: Mon, 8 Jul 2024 17:41:57 +0200 Subject: [PATCH] ignore device_num, connect to default sensor if no serial or usb is defined Related to: - https://github.com/orbbec/OrbbecSDK_ROS1/issues/42 --- src/ob_camera_node_driver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ob_camera_node_driver.cpp b/src/ob_camera_node_driver.cpp index cc3afa39..30a1093e 100644 --- a/src/ob_camera_node_driver.cpp +++ b/src/ob_camera_node_driver.cpp @@ -89,7 +89,7 @@ void OBCameraNodeDriver::init() { std::shared_ptr OBCameraNodeDriver::selectDevice( const std::shared_ptr& list) { - if (device_num_ == 1) { + if (serial_number_.empty() && usb_port_.empty()) { ROS_INFO_STREAM("Connecting to the default device"); return list->getDevice(0); }