@@ -62,7 +62,8 @@ TEST(CriticTests, ConstraintsCritic)
6262 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
6363 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
6464 " dummy_costmap" , " " , true );
65- ParametersHandler param_handler (node);
65+ std::string name = " test" ;
66+ ParametersHandler param_handler (node, name);
6667 rclcpp_lifecycle::State lstate;
6768 costmap_ros->on_configure (lstate);
6869
@@ -130,7 +131,8 @@ TEST(CriticTests, ObstacleCriticMisalignedParams) {
130131 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
131132 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
132133 " dummy_costmap" , " " , true );
133- ParametersHandler param_handler (node);
134+ std::string name = " test" ;
135+ ParametersHandler param_handler (node, name);
134136 auto getParam = param_handler.getParamGetter (" critic" );
135137 bool consider_footprint;
136138 getParam (consider_footprint, " consider_footprint" , true );
@@ -150,7 +152,8 @@ TEST(CriticTests, ObstacleCriticAlignedParams) {
150152 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
151153 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
152154 " dummy_costmap" , " " , true );
153- ParametersHandler param_handler (node);
155+ std::string name = " test" ;
156+ ParametersHandler param_handler (node, name);
154157 auto getParam = param_handler.getParamGetter (" critic" );
155158 bool consider_footprint;
156159 getParam (consider_footprint, " consider_footprint" , false );
@@ -169,7 +172,8 @@ TEST(CriticTests, CostCriticMisAlignedParams) {
169172 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
170173 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
171174 " dummy_costmap" , " " , true );
172- ParametersHandler param_handler (node);
175+ std::string name = " test" ;
176+ ParametersHandler param_handler (node, name);
173177 rclcpp_lifecycle::State lstate;
174178 auto getParam = param_handler.getParamGetter (" critic" );
175179 bool consider_footprint;
@@ -189,7 +193,8 @@ TEST(CriticTests, CostCriticAlignedParams) {
189193 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
190194 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
191195 " dummy_costmap" , " " , true );
192- ParametersHandler param_handler (node);
196+ std::string name = " test" ;
197+ ParametersHandler param_handler (node, name);
193198 rclcpp_lifecycle::State lstate;
194199 auto getParam = param_handler.getParamGetter (" critic" );
195200 bool consider_footprint;
@@ -207,7 +212,8 @@ TEST(CriticTests, GoalAngleCritic)
207212 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
208213 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
209214 " dummy_costmap" , " " , true );
210- ParametersHandler param_handler (node);
215+ std::string name = " test" ;
216+ ParametersHandler param_handler (node, name);
211217 rclcpp_lifecycle::State lstate;
212218 costmap_ros->on_configure (lstate);
213219
@@ -266,7 +272,8 @@ TEST(CriticTests, GoalCritic)
266272 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
267273 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
268274 " dummy_costmap" , " " , true );
269- ParametersHandler param_handler (node);
275+ std::string name = " test" ;
276+ ParametersHandler param_handler (node, name);
270277 rclcpp_lifecycle::State lstate;
271278 costmap_ros->on_configure (lstate);
272279
@@ -318,7 +325,8 @@ TEST(CriticTests, PathAngleCritic)
318325 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
319326 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
320327 " dummy_costmap" , " " , true );
321- ParametersHandler param_handler (node);
328+ std::string name = " test" ;
329+ ParametersHandler param_handler (node, name);
322330 rclcpp_lifecycle::State lstate;
323331 costmap_ros->on_configure (lstate);
324332
@@ -436,7 +444,8 @@ TEST(CriticTests, PreferForwardCritic)
436444 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
437445 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
438446 " dummy_costmap" , " " , true );
439- ParametersHandler param_handler (node);
447+ std::string name = " test" ;
448+ ParametersHandler param_handler (node, name);
440449 rclcpp_lifecycle::State lstate;
441450 costmap_ros->on_configure (lstate);
442451
@@ -492,7 +501,8 @@ TEST(CriticTests, TwirlingCritic)
492501 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
493502 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
494503 " dummy_costmap" , " " , true );
495- ParametersHandler param_handler (node);
504+ std::string name = " test" ;
505+ ParametersHandler param_handler (node, name);
496506 rclcpp_lifecycle::State lstate;
497507 costmap_ros->on_configure (lstate);
498508
@@ -556,7 +566,8 @@ TEST(CriticTests, PathFollowCritic)
556566 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
557567 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
558568 " dummy_costmap" , " " , true );
559- ParametersHandler param_handler (node);
569+ std::string name = " test" ;
570+ ParametersHandler param_handler (node, name);
560571 rclcpp_lifecycle::State lstate;
561572 costmap_ros->on_configure (lstate);
562573
@@ -607,7 +618,8 @@ TEST(CriticTests, PathAlignCritic)
607618 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
608619 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
609620 " dummy_costmap" , " " , true );
610- ParametersHandler param_handler (node);
621+ std::string name = " test" ;
622+ ParametersHandler param_handler (node, name);
611623 rclcpp_lifecycle::State lstate;
612624 costmap_ros->on_configure (lstate);
613625
@@ -717,7 +729,8 @@ TEST(CriticTests, VelocityDeadbandCritic)
717729 auto node = std::make_shared<rclcpp_lifecycle::LifecycleNode>(" my_node" );
718730 auto costmap_ros = std::make_shared<nav2_costmap_2d::Costmap2DROS>(
719731 " dummy_costmap" , " " , true );
720- ParametersHandler param_handler (node);
732+ std::string name = " test" ;
733+ ParametersHandler param_handler (node, name);
721734 auto getParam = param_handler.getParamGetter (" critic" );
722735 std::vector<double > deadband_velocities_;
723736 getParam (deadband_velocities_, " deadband_velocities" , std::vector<double >{0.08 , 0.08 , 0.08 });
0 commit comments