feat: support versioned preset launch configuration

This commit is contained in:
slz
2026-09-03 16:36:24 +08:00
parent 27e0c7dc97
commit 5fcd5eed85
15 changed files with 110 additions and 14 deletions
+15
View File
@@ -1745,6 +1745,21 @@ void OBCameraNode::getDeviceConfigCallback(const std::shared_ptr<GetDeviceConfig
RCLCPP_DEBUG_STREAM(logger_, "Failed to get current preset");
}
try {
const char* version = device_->getCurrentPresetDepthWorkModeVersion();
if (version != nullptr) {
response->preset_depth_work_mode_version = version;
}
} catch (const ob::Error& e) {
RCLCPP_DEBUG_STREAM(logger_, "Failed to get current preset depth work mode version: "
<< orbbec_camera::formatObErrorWithStatus(e));
} catch (const std::exception& e) {
RCLCPP_DEBUG_STREAM(logger_,
"Failed to get current preset depth work mode version: " << e.what());
} catch (...) {
RCLCPP_DEBUG_STREAM(logger_, "Failed to get current preset depth work mode version");
}
try {
if (device_->isColorPresetSupported()) {
const char* color_preset_name = device_->getCurrentColorPresetName();