From 3e5a496b178c3f69133368898a92d0da47b92ba4 Mon Sep 17 00:00:00 2001 From: ob-yalian Date: Mon, 21 Sep 2026 15:56:33 +0800 Subject: [PATCH] Revert "fix: unify auto exposure parameter for color and IR streams" This reverts commit 52f32e75aa7c17bf2acf2cad50c86e12348294b7. --- orbbec_camera/launch/gemini_301_series.launch.py | 2 +- orbbec_camera/src/ob_camera_node.cpp | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/orbbec_camera/launch/gemini_301_series.launch.py b/orbbec_camera/launch/gemini_301_series.launch.py index 4c2d7619..46e045b0 100644 --- a/orbbec_camera/launch/gemini_301_series.launch.py +++ b/orbbec_camera/launch/gemini_301_series.launch.py @@ -206,7 +206,7 @@ def generate_launch_description(): # Gemini 301 color/depth/IR share these AE, exposure and gain controls. # Use only these entries in YAML too; color exposure/max exposure values # must be multiplied by 100 when migrating. Existing IR units are unchanged. - DeclareLaunchArgument('enable_auto_exposure', default_value='true'), + DeclareLaunchArgument('enable_ir_auto_exposure', default_value='true'), DeclareLaunchArgument('ir_exposure', default_value='-1'), DeclareLaunchArgument('ir_gain', default_value='-1'), DeclareLaunchArgument('ir_ae_max_exposure', default_value='-1'), diff --git a/orbbec_camera/src/ob_camera_node.cpp b/orbbec_camera/src/ob_camera_node.cpp index a1cd7891..9fb3451b 100644 --- a/orbbec_camera/src/ob_camera_node.cpp +++ b/orbbec_camera/src/ob_camera_node.cpp @@ -1740,8 +1740,7 @@ void OBCameraNode::setupDevices() { "Current depth auto exposure priority: " << (device_->getIntProperty(OB_PROP_DEPTH_AUTO_EXPOSURE_PRIORITY_INT) ? "ON" : "OFF"))); } - if ((should_apply_launch_config("enable_auto_exposure") || - should_apply_launch_config("enable_ir_auto_exposure")) && + if (should_apply_launch_config("enable_ir_auto_exposure") && device_->isPropertySupported(OB_PROP_IR_AUTO_EXPOSURE_BOOL, OB_PERMISSION_WRITE)) { TRY_TO_SET_PROPERTY(setBoolProperty, OB_PROP_IR_AUTO_EXPOSURE_BOOL, enable_ir_auto_exposure_); TRY_EXECUTE_BLOCK(RCLCPP_INFO_STREAM( @@ -4884,11 +4883,7 @@ void OBCameraNode::getParameters() { setAndGetNodeParameter(mean_intensity_set_point_, "mean_intensity_set_point", depth_brightness_); setAndGetNodeParameter(depth_precision_str_, "depth_precision", ""); - setAndGetNodeParameter(enable_ir_auto_exposure_, - isLaunchParamProvided("enable_auto_exposure") - ? "enable_auto_exposure" - : "enable_ir_auto_exposure", - true); + setAndGetNodeParameter(enable_ir_auto_exposure_, "enable_ir_auto_exposure", true); setAndGetNodeParameter(ir_exposure_, "ir_exposure", -1); setAndGetNodeParameter(ir_gain_, "ir_gain", -1); setAndGetNodeParameter(ir_ae_max_exposure_, "ir_ae_max_exposure", -1);