mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-09 14:27:02 +08:00
Add industry_mode param in dabai_dcw2.launch.py and dabai_dw2.launch.py
This commit is contained in:
@@ -177,6 +177,29 @@ void OBCameraNode::setupDevices() {
|
||||
RCLCPP_INFO_STREAM(logger_, "Setting heartbeat to " << (enable_heartbeat_ ? "ON" : "OFF"));
|
||||
TRY_TO_SET_PROPERTY(setBoolProperty, OB_PROP_HEARTBEAT_BOOL, enable_heartbeat_);
|
||||
}
|
||||
if (device_->isPropertySupported(OB_PROP_DEPTH_INDUSTRY_MODE_INT, OB_PERMISSION_READ_WRITE)) {
|
||||
if (industry_mode_ == "default") {
|
||||
OBDepthIndustryMode mode = OB_INDUSTRY_DEFAULT;
|
||||
device_->setIntProperty(OB_PROP_DEPTH_INDUSTRY_MODE_INT, (int32_t)mode);
|
||||
} else if (industry_mode_ == "mode1") {
|
||||
OBDepthIndustryMode mode = OB_INDUSTRY_MODE1;
|
||||
device_->setIntProperty(OB_PROP_DEPTH_INDUSTRY_MODE_INT, (int32_t)mode);
|
||||
} else if (industry_mode_ == "mode2") {
|
||||
OBDepthIndustryMode mode = OB_INDUSTRY_MODE2;
|
||||
device_->setIntProperty(OB_PROP_DEPTH_INDUSTRY_MODE_INT, (int32_t)mode);
|
||||
} else if (industry_mode_ == "mode3") {
|
||||
OBDepthIndustryMode mode = OB_INDUSTRY_MODE3;
|
||||
device_->setIntProperty(OB_PROP_DEPTH_INDUSTRY_MODE_INT, (int32_t)mode);
|
||||
} else if (industry_mode_ == "mode4") {
|
||||
OBDepthIndustryMode mode = OB_INDUSTRY_MODE4;
|
||||
device_->setIntProperty(OB_PROP_DEPTH_INDUSTRY_MODE_INT, (int32_t)mode);
|
||||
} else if (industry_mode_ == "mode5") {
|
||||
OBDepthIndustryMode mode = OB_INDUSTRY_MODE5;
|
||||
device_->setIntProperty(OB_PROP_DEPTH_INDUSTRY_MODE_INT, (int32_t)mode);
|
||||
}
|
||||
RCLCPP_INFO_STREAM(logger_, "Setting industry mode to "
|
||||
<< device_->getIntProperty(OB_PROP_DEPTH_INDUSTRY_MODE_INT));
|
||||
}
|
||||
if (max_depth_limit_ > 0 &&
|
||||
device_->isPropertySupported(OB_PROP_MAX_DEPTH_INT, OB_PERMISSION_READ_WRITE)) {
|
||||
RCLCPP_INFO_STREAM(logger_, "Setting max depth limit to " << max_depth_limit_);
|
||||
@@ -1158,6 +1181,7 @@ void OBCameraNode::getParameters() {
|
||||
setAndGetNodeParameter<int>(min_depth_limit_, "min_depth_limit", 0);
|
||||
setAndGetNodeParameter<int>(max_depth_limit_, "max_depth_limit", 0);
|
||||
setAndGetNodeParameter<bool>(enable_heartbeat_, "enable_heartbeat", false);
|
||||
setAndGetNodeParameter<std::string>(industry_mode_, "industry_mode", "default");
|
||||
setAndGetNodeParameter<bool>(enable_color_undistortion_, "enable_color_undistortion", false);
|
||||
setAndGetNodeParameter<int>(color_ae_roi_left_, "color_ae_roi_left", -1);
|
||||
setAndGetNodeParameter<int>(color_ae_roi_top_, "color_ae_roi_top", -1);
|
||||
|
||||
Reference in New Issue
Block a user