From 3da38e76a659ae56ba859190ae4d9f09f91ceaa2 Mon Sep 17 00:00:00 2001 From: Jonas Otto Date: Fri, 2 Feb 2024 13:29:44 +0100 Subject: [PATCH] add start_type_description_service default parameter --- src/service_wrapper.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/service_wrapper.cpp b/src/service_wrapper.cpp index acb8ecb..fa2b49b 100644 --- a/src/service_wrapper.cpp +++ b/src/service_wrapper.cpp @@ -8,6 +8,7 @@ #include "service_wrapper.hpp" #include +#include using namespace std::chrono_literals; @@ -230,9 +231,11 @@ void ServiceWrapper::nodeParametersReceived(const rclcpp::Client(future.get()->result.names); if (ignoreDefaultParameters) { - // ignore node used for querying the services + // Hide default parameters "use_sim_time", "qos_overrides./*", "start_type_description_service" + static std::regex HIDDEN_PARAMETER_REGEX = std::regex( + "^use_sim_time$|^qos_overrides\\.\\/.*$|^start_type_description_service$"); std::erase_if(valueRequest->parameterNames, [](const std::string &s) { - return (s.starts_with("qos_overrides./") || s.starts_with("use_sim_time")); + return std::regex_match(s, HIDDEN_PARAMETER_REGEX); }); }