mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-13 19:40:19 +08:00
Add enable_color_backlight_compenstation param
This commit is contained in:
@@ -506,6 +506,7 @@ class OBCameraNode {
|
||||
int color_saturation_ = -1;
|
||||
int color_constrast_ = -1;
|
||||
int color_hue_ = -1;
|
||||
int enable_color_backlight_compenstation_ = -1;
|
||||
int ir_exposure_ = -1;
|
||||
int ir_gain_ = -1;
|
||||
int ir_ae_max_exposure_ = -1;
|
||||
|
||||
@@ -82,6 +82,7 @@ def generate_launch_description():
|
||||
DeclareLaunchArgument('color_saturation', default_value='-1'),
|
||||
DeclareLaunchArgument('color_constrast', default_value='-1'),
|
||||
DeclareLaunchArgument('color_hue', default_value='-1'),
|
||||
DeclareLaunchArgument('enable_color_backlight_compenstation', default_value='-1'),
|
||||
DeclareLaunchArgument('depth_width', default_value='0'),
|
||||
DeclareLaunchArgument('depth_height', default_value='0'),
|
||||
DeclareLaunchArgument('depth_fps', default_value='0'),
|
||||
|
||||
@@ -415,6 +415,11 @@ void OBCameraNode::setupDevices() {
|
||||
RCLCPP_INFO_STREAM(logger_, "Setting color hue to " << color_hue_);
|
||||
TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_COLOR_HUE_INT, color_hue_);
|
||||
}
|
||||
if (enable_color_backlight_compenstation_ != -1 &&
|
||||
device_->isPropertySupported(OB_PROP_COLOR_BACKLIGHT_COMPENSATION_INT, OB_PERMISSION_WRITE)) {
|
||||
RCLCPP_INFO_STREAM(logger_, "Setting color backlight compenstation to " << (enable_color_backlight_compenstation_ ? "ON" : "OFF"));
|
||||
TRY_TO_SET_PROPERTY(setIntProperty, OB_PROP_COLOR_BACKLIGHT_COMPENSATION_INT, enable_color_backlight_compenstation_);
|
||||
}
|
||||
// ir ae max
|
||||
if (ir_ae_max_exposure_ != -1 &&
|
||||
device_->isPropertySupported(OB_PROP_IR_AE_MAX_EXPOSURE_INT, OB_PERMISSION_WRITE)) {
|
||||
@@ -1269,6 +1274,7 @@ void OBCameraNode::getParameters() {
|
||||
setAndGetNodeParameter<int>(color_saturation_, "color_saturation", -1);
|
||||
setAndGetNodeParameter<int>(color_constrast_, "color_constrast", -1);
|
||||
setAndGetNodeParameter<int>(color_hue_, "color_hue", -1);
|
||||
setAndGetNodeParameter<int>(enable_color_backlight_compenstation_, "enable_color_backlight_compenstation", -1);
|
||||
setAndGetNodeParameter(enable_ir_auto_exposure_, "enable_ir_auto_exposure", true);
|
||||
setAndGetNodeParameter<int>(ir_exposure_, "ir_exposure", -1);
|
||||
setAndGetNodeParameter<int>(ir_gain_, "ir_gain", -1);
|
||||
|
||||
Reference in New Issue
Block a user