Skip to content

Commit a0a7892

Browse files
fix
Signed-off-by: Nils-Christian Iseke <nilsmailiseke@gmail.com>
1 parent 43749c2 commit a0a7892

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

nav2_mppi_controller/src/parameters_handler.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ ParametersHandler::dynamicParamsCallback(
6464

6565
for (auto & param : parameters) {
6666
const std::string & param_name = param.get_name();
67-
67+
if(param_name.find(node_name_ + ".") != 0){
68+
continue;
69+
}
6870
if (auto callback = get_param_callbacks_.find(param_name);
6971
callback != get_param_callbacks_.end())
7072
{

nav2_mppi_controller/test/parameter_handler_test.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ TEST(ParameterHandlerTest, GetSystemParamsTest)
137137
EXPECT_EQ(p2, 7);
138138
}
139139

140+
140141
TEST(ParameterHandlerTest, DynamicAndStaticParametersTest)
141142
{
142143
auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>("my_node");

0 commit comments

Comments
 (0)