mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-07 13:37:44 +08:00
fix: remove unused calibration parameter assignment in setupPipelineConfig
This commit is contained in:
@@ -217,7 +217,7 @@ void OBCameraNode::setupDevices() {
|
||||
std::vector<int> values;
|
||||
values.reserve(4);
|
||||
while (std::getline(iss, token, ',')) {
|
||||
values.push_back(std::stoi(token));
|
||||
values.push_back(std::stoi(token));
|
||||
}
|
||||
|
||||
if (values.size() >= 4) {
|
||||
@@ -226,17 +226,18 @@ void OBCameraNode::setupDevices() {
|
||||
presetResolutionConfig.irDecimationFactor = values[2];
|
||||
presetResolutionConfig.depthDecimationFactor = values[3];
|
||||
} else {
|
||||
RCLCPP_WARN_STREAM(logger_, "Invalid preset_resolution_config parameter. "
|
||||
"Expected format: width,height,ir_decimation_factor,depth_decimation_factor");
|
||||
RCLCPP_WARN_STREAM(
|
||||
logger_,
|
||||
"Invalid preset_resolution_config parameter. "
|
||||
"Expected format: width,height,ir_decimation_factor,depth_decimation_factor");
|
||||
}
|
||||
|
||||
RCLCPP_INFO_STREAM(logger_, "Setting preset resolution config to "
|
||||
<< "width: " << presetResolutionConfig.width
|
||||
<< ", height: " << presetResolutionConfig.height
|
||||
<< ", ir decimation factor: "
|
||||
<< presetResolutionConfig.irDecimationFactor
|
||||
<< ", depth decimation factor: "
|
||||
<< presetResolutionConfig.depthDecimationFactor);
|
||||
RCLCPP_INFO_STREAM(
|
||||
logger_, "Setting preset resolution config to "
|
||||
<< "width: " << presetResolutionConfig.width
|
||||
<< ", height: " << presetResolutionConfig.height << ", ir decimation factor: "
|
||||
<< presetResolutionConfig.irDecimationFactor << ", depth decimation factor: "
|
||||
<< presetResolutionConfig.depthDecimationFactor);
|
||||
|
||||
TRY_EXECUTE_BLOCK(device_->setStructuredData(OB_STRUCT_PRESET_RESOLUTION_CONFIG,
|
||||
(uint8_t *)&presetResolutionConfig,
|
||||
@@ -2205,6 +2206,14 @@ void OBCameraNode::setupPipelineConfig() {
|
||||
auto device_info = device_->getDeviceInfo();
|
||||
CHECK_NOTNULL(device_info.get());
|
||||
auto pid = device_info->getPid();
|
||||
if (depth_registration_ && enable_stream_[COLOR] && enable_stream_[DEPTH] &&
|
||||
!isGemini335PID(pid)) {
|
||||
OBAlignMode align_mode = align_mode_ == "HW" ? ALIGN_D2C_HW_MODE : ALIGN_D2C_SW_MODE;
|
||||
RCLCPP_INFO_STREAM(logger_, "set align mode to " << magic_enum::enum_name(align_mode));
|
||||
pipeline_config_->setAlignMode(align_mode);
|
||||
RCLCPP_INFO_STREAM(logger_, "enable depth scale " << (enable_depth_scale_ ? "ON" : "OFF"));
|
||||
pipeline_config_->setDepthScaleRequire(enable_depth_scale_);
|
||||
}
|
||||
for (const auto &stream_index : IMAGE_STREAMS) {
|
||||
if (enable_stream_[stream_index]) {
|
||||
RCLCPP_INFO_STREAM(logger_, "Enable " << stream_name_[stream_index] << " stream");
|
||||
|
||||
Reference in New Issue
Block a user