Skip to content

Commit

Permalink
add start_type_description_service default parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
ottojo committed Feb 2, 2024
1 parent bf394a9 commit 3da38e7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/service_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include "service_wrapper.hpp"
#include <chrono>
#include <regex>

using namespace std::chrono_literals;

Expand Down Expand Up @@ -230,9 +231,11 @@ void ServiceWrapper::nodeParametersReceived(const rclcpp::Client<rcl_interfaces:
auto valueRequest = std::make_shared<ParameterValueRequest>(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);
});
}

Expand Down

0 comments on commit 3da38e7

Please sign in to comment.