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
+9 -1
View File
@@ -423,7 +423,15 @@ void logCurrentPresetList(const rclcpp::Logger &logger, const std::shared_ptr<ob
const uint32_t count = preset_list->getCount();
RCLCPP_INFO(logger, "[%s] Current preset count: %u", stage, count);
for (uint32_t i = 0; i < count; ++i) {
RCLCPP_INFO(logger, "[%s] Preset[%u]: %s", stage, i, preset_list->getName(i));
const char *version = nullptr;
try {
version = preset_list->getDepthWorkModeVersion(i);
} catch (...) {
// Older firmware can enumerate presets without exposing version information.
}
RCLCPP_INFO(logger, "[%s] Preset[%u]: %s, depth work mode version: %s", stage, i,
preset_list->getName(i),
version == nullptr || version[0] == '\0' ? "not available" : version);
}
} catch (const ob::Error &e) {
RCLCPP_WARN(logger, "[%s] Failed to query preset list: %s", stage,