mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-07 21:37:46 +08:00
Merge branch 'customer/sdk_2.8.2_338' into merge/sdk_2.8.2
This commit is contained in:
@@ -3437,8 +3437,7 @@ void OBCameraNode::setDepthAutoExposureROI() {
|
||||
return;
|
||||
}
|
||||
if (isGemini305SeriesPID(pid_) && ae_reference_stream_ == "color") {
|
||||
RCLCPP_WARN_STREAM(logger_,
|
||||
"Skip setting depth AE ROI because AE Reference Stream is color");
|
||||
RCLCPP_WARN_STREAM(logger_, "Skip setting depth AE ROI because AE Reference Stream is color");
|
||||
depth_roi_has_run = true;
|
||||
return;
|
||||
}
|
||||
@@ -3483,8 +3482,7 @@ void OBCameraNode::setColorAutoExposureROI() {
|
||||
return;
|
||||
}
|
||||
if (isGemini305SeriesPID(pid_) && ae_reference_stream_ == "depth") {
|
||||
RCLCPP_WARN_STREAM(logger_,
|
||||
"Skip setting color AE ROI because AE Reference Stream is depth");
|
||||
RCLCPP_WARN_STREAM(logger_, "Skip setting color AE ROI because AE Reference Stream is depth");
|
||||
color_roi_has_run = true;
|
||||
return;
|
||||
}
|
||||
@@ -4717,7 +4715,8 @@ bool OBCameraNode::isGemini335PID(uint32_t pid) {
|
||||
pid == GEMINI_335L_PID || pid == GEMINI_330L_PID || pid == GEMINI_336L_PID ||
|
||||
pid == GEMINI_335LG_PID || pid == GEMINI_336LG_PID || pid == GEMINI_335LE_PID ||
|
||||
pid == GEMINI_336LE_PID || pid == CUSTOM_ADVANTECH_GEMINI_336_PID ||
|
||||
pid == CUSTOM_ADVANTECH_GEMINI_336L_PID || pid == GEMINI_338_PID;
|
||||
pid == CUSTOM_ADVANTECH_GEMINI_336L_PID || pid == GEMINI_338_PID ||
|
||||
pid == GEMINI_338L_PID || pid == GEMINI_338LE_PID || pid == GEMINI_338LG_PID;
|
||||
}
|
||||
|
||||
bool OBCameraNode::isGemini435LePID(uint32_t pid) { return pid == GEMINI_435Le_PID; }
|
||||
|
||||
@@ -217,7 +217,8 @@ void OBCameraNodeDriver::init() {
|
||||
ob::Context::setLoggerFileName(log_file_name);
|
||||
RCLCPP_INFO_STREAM(logger_, "SDK log file name set to: " << log_file_name);
|
||||
} catch (const ob::Error &e) {
|
||||
RCLCPP_WARN_STREAM(logger_, "Failed to set SDK log file name: " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
RCLCPP_WARN_STREAM(logger_, "Failed to set SDK log file name: "
|
||||
<< orbbec_camera::formatObErrorWithStatus(e));
|
||||
}
|
||||
}
|
||||
// Force IP
|
||||
@@ -528,7 +529,8 @@ void OBCameraNodeDriver::resetDevice() {
|
||||
device_.reset();
|
||||
RCLCPP_INFO_STREAM(logger_, "device_ reset completed");
|
||||
} catch (const ob::Error &e) {
|
||||
RCLCPP_WARN_STREAM(logger_, "OB Exception during device reset: " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
RCLCPP_WARN_STREAM(logger_, "OB Exception during device reset: "
|
||||
<< orbbec_camera::formatObErrorWithStatus(e));
|
||||
} catch (const std::exception &e) {
|
||||
RCLCPP_WARN_STREAM(logger_, "Standard exception during device reset: " << e.what());
|
||||
} catch (...) {
|
||||
@@ -838,8 +840,9 @@ std::shared_ptr<ob::Device> OBCameraNodeDriver::selectDeviceBySerialNumber(
|
||||
}
|
||||
}
|
||||
} catch (ob::Error &e) {
|
||||
RCLCPP_ERROR_STREAM_THROTTLE(logger_, *get_clock(), 5000,
|
||||
"Failed to get device info " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
RCLCPP_ERROR_STREAM_THROTTLE(
|
||||
logger_, *get_clock(), 5000,
|
||||
"Failed to get device info " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
} catch (std::exception &e) {
|
||||
RCLCPP_ERROR_STREAM_THROTTLE(logger_, *get_clock(), 5000,
|
||||
"Failed to get device info " << e.what());
|
||||
@@ -871,8 +874,9 @@ std::shared_ptr<ob::Device> OBCameraNodeDriver::selectDeviceByUSBPort(
|
||||
}
|
||||
return device;
|
||||
} catch (ob::Error &e) {
|
||||
RCLCPP_ERROR_STREAM_THROTTLE(logger_, *get_clock(), 5000,
|
||||
"Failed to get device info " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
RCLCPP_ERROR_STREAM_THROTTLE(
|
||||
logger_, *get_clock(), 5000,
|
||||
"Failed to get device info " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
} catch (std::exception &e) {
|
||||
RCLCPP_ERROR_STREAM_THROTTLE(logger_, *get_clock(), 5000,
|
||||
"Failed to get device info " << e.what());
|
||||
@@ -907,8 +911,9 @@ std::shared_ptr<ob::Device> OBCameraNodeDriver::selectDeviceByNetIP(
|
||||
return list->getDevice(i, device_access_mode_);
|
||||
}
|
||||
} catch (ob::Error &e) {
|
||||
RCLCPP_ERROR_STREAM_THROTTLE(logger_, *get_clock(), 5000,
|
||||
"Failed to get device info " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
RCLCPP_ERROR_STREAM_THROTTLE(
|
||||
logger_, *get_clock(), 5000,
|
||||
"Failed to get device info " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
continue;
|
||||
} catch (std::exception &e) {
|
||||
RCLCPP_ERROR_STREAM_THROTTLE(logger_, *get_clock(), 5000,
|
||||
@@ -1196,7 +1201,8 @@ bool OBCameraNodeDriver::applyForceIpConfig() {
|
||||
RCLCPP_ERROR(logger_, "[ForceIP] Failed to apply config (SDK returned false)");
|
||||
}
|
||||
} catch (const ob::Error &e) {
|
||||
RCLCPP_ERROR(logger_, "[ForceIP] ob::Error: %s", orbbec_camera::formatObErrorWithStatus(e).c_str());
|
||||
RCLCPP_ERROR(logger_, "[ForceIP] ob::Error: %s",
|
||||
orbbec_camera::formatObErrorWithStatus(e).c_str());
|
||||
} catch (const std::exception &e) {
|
||||
RCLCPP_ERROR(logger_, "[ForceIP] std::exception: %s", e.what());
|
||||
} catch (...) {
|
||||
@@ -1328,7 +1334,7 @@ void OBCameraNodeDriver::startDevice(const std::shared_ptr<ob::DeviceList> &list
|
||||
}
|
||||
|
||||
auto pid = device->getDeviceInfo()->getPid();
|
||||
if (GEMINI_335LG_PID == pid) {
|
||||
if (GEMINI_335LG_PID == pid || GEMINI_338LG_PID == pid) {
|
||||
ob_camera_node_->startGmslTrigger();
|
||||
}
|
||||
if (isGemini305SeriesPID(pid)) {
|
||||
@@ -1336,7 +1342,8 @@ void OBCameraNodeDriver::startDevice(const std::shared_ptr<ob::DeviceList> &list
|
||||
ob_camera_node_->startStreams();
|
||||
}
|
||||
} catch (ob::Error &e) {
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to initialize device " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
RCLCPP_ERROR_STREAM(
|
||||
logger_, "Failed to initialize device " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
start_device_failed = true;
|
||||
} catch (std::exception &e) {
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to initialize device " << e.what());
|
||||
@@ -1409,7 +1416,8 @@ void OBCameraNodeDriver::updatePresetFirmware(std::string path) {
|
||||
}
|
||||
}
|
||||
} catch (ob::Error &e) {
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to update Preset Firmware " << orbbec_camera::formatObErrorWithStatus(e));
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to update Preset Firmware "
|
||||
<< orbbec_camera::formatObErrorWithStatus(e));
|
||||
} catch (std::exception &e) {
|
||||
RCLCPP_ERROR_STREAM(logger_, "Failed to update Preset Firmware " << e.what());
|
||||
} catch (...) {
|
||||
|
||||
@@ -27,11 +27,13 @@ namespace {
|
||||
bool isGemini330SeriesForDisparity(uint32_t pid) {
|
||||
return pid == GEMINI_335_PID || pid == GEMINI_336_PID || pid == GEMINI_330_PID ||
|
||||
pid == GEMINI_335L_PID || pid == GEMINI_336L_PID || pid == GEMINI_330L_PID ||
|
||||
pid == GEMINI_335LG_PID || pid == GEMINI_335LE_PID;
|
||||
pid == GEMINI_335LG_PID || pid == GEMINI_335LE_PID || pid == GEMINI_338_PID ||
|
||||
pid == GEMINI_338LG_PID || pid == GEMINI_338LE_PID || pid == GEMINI_338L_PID ||
|
||||
pid == GEMINI_331L_PID;
|
||||
}
|
||||
|
||||
bool isSupportedDisparityResolutionForPid(uint32_t pid, int width, int height) {
|
||||
if (pid == GEMINI_335LE_PID) {
|
||||
if (pid == GEMINI_335LE_PID || pid == GEMINI_338LE_PID) {
|
||||
return (width == 1280 && height == 800) || (width == 640 && height == 400) ||
|
||||
(width == 424 && height == 266) || (width == 320 && height == 200);
|
||||
}
|
||||
@@ -41,11 +43,11 @@ bool isSupportedDisparityResolutionForPid(uint32_t pid, int width, int height) {
|
||||
}
|
||||
|
||||
std::string getDisparityResolutionHintByPid(uint32_t pid) {
|
||||
if (pid == GEMINI_335LE_PID) {
|
||||
return "Supported resolutions for Gemini 335Le: 1280x800/640x400/424x266/320x200";
|
||||
if (pid == GEMINI_335LE_PID || pid == GEMINI_338LE_PID) {
|
||||
return "Supported resolutions for the current device: 1280x800/640x400/424x266/320x200";
|
||||
}
|
||||
|
||||
return "Supported resolutions for Gemini 335/336/330/335L/336L/335Lg/330L: "
|
||||
return "Supported resolutions for the current device: "
|
||||
"1280x800/1280x720/640x400/424x266";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user