mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 20:17:47 +08:00
fix: update setupDevices to correctly handle IR auto exposure settings
This commit is contained in:
@@ -661,6 +661,11 @@ void OBCameraNode::setupDevices() {
|
||||
TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_DEPTH_AUTO_EXPOSURE_PRIORITY_INT,
|
||||
set_enable_depth_auto_exposure_priority);
|
||||
}
|
||||
if (device_->isPropertySupported(OB_PROP_IR_AUTO_EXPOSURE_BOOL, OB_PERMISSION_WRITE)) {
|
||||
RCLCPP_INFO_STREAM(logger_,
|
||||
"Setting IR auto exposure to " << (enable_ir_auto_exposure_ ? "ON" : "OFF"));
|
||||
TRY_TO_SET_PROPERTY(setBoolProperty, OB_PROP_IR_AUTO_EXPOSURE_BOOL, enable_ir_auto_exposure_);
|
||||
}
|
||||
if (mean_intensity_set_point_ != -1 &&
|
||||
device_->isPropertySupported(OB_PROP_IR_BRIGHTNESS_INT, OB_PERMISSION_WRITE)) {
|
||||
auto range = device_->getIntPropertyRange(OB_PROP_IR_BRIGHTNESS_INT);
|
||||
@@ -697,7 +702,6 @@ void OBCameraNode::setupDevices() {
|
||||
TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_IR_BRIGHTNESS_INT, ir_brightness_);
|
||||
}
|
||||
}
|
||||
|
||||
if (ir_exposure_ != -1 &&
|
||||
device_->isPropertySupported(OB_PROP_IR_EXPOSURE_INT, OB_PERMISSION_WRITE)) {
|
||||
auto range = device_->getIntPropertyRange(OB_PROP_IR_EXPOSURE_INT);
|
||||
@@ -719,11 +723,6 @@ void OBCameraNode::setupDevices() {
|
||||
TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_IR_GAIN_INT, ir_gain_);
|
||||
}
|
||||
}
|
||||
if (device_->isPropertySupported(OB_PROP_IR_AUTO_EXPOSURE_BOOL, OB_PERMISSION_WRITE)) {
|
||||
RCLCPP_INFO_STREAM(logger_,
|
||||
"Setting IR auto exposure to " << (enable_ir_auto_exposure_ ? "ON" : "OFF"));
|
||||
TRY_TO_SET_PROPERTY(setBoolProperty, OB_PROP_IR_AUTO_EXPOSURE_BOOL, enable_ir_auto_exposure_);
|
||||
}
|
||||
if (device_->isPropertySupported(OB_PROP_IR_LONG_EXPOSURE_BOOL, OB_PERMISSION_WRITE)) {
|
||||
RCLCPP_INFO_STREAM(logger_,
|
||||
"Setting IR long exposure to " << (enable_ir_long_exposure_ ? "ON" : "OFF"));
|
||||
|
||||
Reference in New Issue
Block a user