Add industry_mode param in dabai_dcw2.launch.py and dabai_dw2.launch.py

This commit is contained in:
jj
2025-04-03 13:45:32 +08:00
parent 5e46ced56e
commit e57c7866d8
4 changed files with 29 additions and 0 deletions
+24
View File
@@ -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);