mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-06 04:57:45 +08:00
feat: support versioned preset launch configuration
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user