diff --git a/src/ros2_medkit_gateway/config/gateway_params.yaml b/src/ros2_medkit_gateway/config/gateway_params.yaml index 3af7d64d..17bba838 100644 --- a/src/ros2_medkit_gateway/config/gateway_params.yaml +++ b/src/ros2_medkit_gateway/config/gateway_params.yaml @@ -273,7 +273,7 @@ ros2_medkit_gateway: # Allowed bulk data categories (besides "rosbags" which is always # available via FaultManager) # Example: ["calibration", "firmware", "comlogs", "snapshots"] - categories: [] + categories: [""] # Plugin Framework # Extend gateway with custom plugins loaded from shared libraries (.so). @@ -291,7 +291,7 @@ ros2_medkit_gateway: # Plugin lifecycle: load -> configure -> set_context -> register_routes # Plugins that throw during any lifecycle call are disabled (not crashed). # Default: [] (no plugins) - plugins: [] + plugins: [""] # Software Updates # Enables /updates endpoints for SOVD-compliant software update management. diff --git a/src/ros2_medkit_gateway/src/gateway_node.cpp b/src/ros2_medkit_gateway/src/gateway_node.cpp index 234e42b7..bd0447d6 100644 --- a/src/ros2_medkit_gateway/src/gateway_node.cpp +++ b/src/ros2_medkit_gateway/src/gateway_node.cpp @@ -426,6 +426,12 @@ GatewayNode::GatewayNode() : Node("ros2_medkit_gateway") { auto bd_storage_dir = get_parameter("bulk_data.storage_dir").as_string(); auto bd_max_upload = static_cast(get_parameter("bulk_data.max_upload_size").as_int()); auto bd_categories = get_parameter("bulk_data.categories").as_string_array(); + bd_categories.erase(std::remove_if(bd_categories.begin(), bd_categories.end(), + [](const auto & item) { + return item.empty(); + }), + bd_categories.end()); + bulk_data_store_ = std::make_unique(bd_storage_dir, bd_max_upload, bd_categories); RCLCPP_INFO(get_logger(), "Bulk data store: dir=%s, max_upload=%zuB, categories=%zu", bd_storage_dir.c_str(), bd_max_upload, bd_categories.size()); @@ -438,6 +444,11 @@ GatewayNode::GatewayNode() : Node("ros2_medkit_gateway") { // Initialize plugin manager plugin_mgr_ = std::make_unique(); auto plugin_names = get_parameter("plugins").as_string_array(); + plugin_names.erase(std::remove_if(plugin_names.begin(), plugin_names.end(), + [](const auto & item) { + return item.empty(); + }), + plugin_names.end()); if (!plugin_names.empty()) { std::vector configs; // Plugin name validation: alphanumeric, underscore, hyphen only (max 256 chars)