@@ -257,8 +257,8 @@ TEST_F(TestLoadController, multi_ctrls_test_type_in_param)
257
257
258
258
TEST_F (TestLoadController, spawner_test_with_params_file_string_parameter)
259
259
{
260
- const std::string test_file_path = ament_index_cpp::get_package_prefix ( " controller_manager " ) +
261
- " /test/ test_controller_spawner_with_type.yaml" ;
260
+ const std::string test_file_path =
261
+ std::string (PARAMETERS_FILE_PATH) + std::string ( " test_controller_spawner_with_type.yaml" ) ;
262
262
263
263
cm_->set_parameter (rclcpp::Parameter (
264
264
" ctrl_with_parameters_and_type.type" , test_controller::TEST_CONTROLLER_CLASS_NAME));
@@ -301,8 +301,8 @@ TEST_F(TestLoadController, spawner_test_with_params_file_string_parameter)
301
301
302
302
TEST_F (TestLoadController, spawner_test_type_in_params_file)
303
303
{
304
- const std::string test_file_path = ament_index_cpp::get_package_prefix ( " controller_manager " ) +
305
- " /test/ test_controller_spawner_with_type.yaml" ;
304
+ const std::string test_file_path =
305
+ std::string (PARAMETERS_FILE_PATH) + std::string ( " test_controller_spawner_with_type.yaml" ) ;
306
306
307
307
ControllerManagerRunner cm_runner (this );
308
308
// Provide controller type via the parsed file
@@ -368,8 +368,8 @@ TEST_F(TestLoadController, spawner_test_type_in_params_file)
368
368
369
369
TEST_F (TestLoadController, spawner_test_with_wildcard_entries_with_no_ctrl_name)
370
370
{
371
- const std::string test_file_path = ament_index_cpp::get_package_prefix ( " controller_manager " ) +
372
- " /test/ test_controller_spawner_wildcard_entries.yaml" ;
371
+ const std::string test_file_path = std::string (PARAMETERS_FILE_PATH ) +
372
+ std::string ( " test_controller_spawner_wildcard_entries.yaml" ) ;
373
373
374
374
ControllerManagerRunner cm_runner (this );
375
375
// Provide controller type via the parsed file
@@ -439,8 +439,8 @@ TEST_F(TestLoadController, spawner_test_with_wildcard_entries_with_no_ctrl_name)
439
439
440
440
TEST_F (TestLoadController, spawner_test_failed_activation_of_controllers)
441
441
{
442
- const std::string test_file_path = ament_index_cpp::get_package_prefix ( " controller_manager " ) +
443
- " /test/ test_controller_spawner_with_interfaces.yaml" ;
442
+ const std::string test_file_path =
443
+ std::string (PARAMETERS_FILE_PATH) + std::string ( " test_controller_spawner_with_interfaces.yaml" ) ;
444
444
445
445
ControllerManagerRunner cm_runner (this );
446
446
// Provide controller type via the parsed file
@@ -577,11 +577,9 @@ TEST_F(TestLoadController, unload_on_kill_activate_as_group)
577
577
TEST_F (TestLoadController, spawner_test_to_check_parameter_overriding)
578
578
{
579
579
const std::string main_test_file_path =
580
- ament_index_cpp::get_package_prefix (" controller_manager" ) +
581
- " /test/test_controller_spawner_with_type.yaml" ;
580
+ std::string (PARAMETERS_FILE_PATH) + std::string (" test_controller_spawner_with_type.yaml" );
582
581
const std::string overriding_test_file_path =
583
- ament_index_cpp::get_package_prefix (" controller_manager" ) +
584
- " /test/test_controller_overriding_parameters.yaml" ;
582
+ std::string (PARAMETERS_FILE_PATH) + std::string (" test_controller_overriding_parameters.yaml" );
585
583
586
584
ControllerManagerRunner cm_runner (this );
587
585
EXPECT_EQ (
@@ -631,11 +629,9 @@ TEST_F(TestLoadController, spawner_test_to_check_parameter_overriding)
631
629
TEST_F (TestLoadController, spawner_test_to_check_parameter_overriding_reverse)
632
630
{
633
631
const std::string main_test_file_path =
634
- ament_index_cpp::get_package_prefix (" controller_manager" ) +
635
- " /test/test_controller_overriding_parameters.yaml" ;
632
+ std::string (PARAMETERS_FILE_PATH) + std::string (" test_controller_overriding_parameters.yaml" );
636
633
const std::string overriding_test_file_path =
637
- ament_index_cpp::get_package_prefix (" controller_manager" ) +
638
- " /test/test_controller_spawner_with_type.yaml" ;
634
+ std::string (PARAMETERS_FILE_PATH) + std::string (" test_controller_spawner_with_type.yaml" );
639
635
640
636
ControllerManagerRunner cm_runner (this );
641
637
EXPECT_EQ (
@@ -684,8 +680,9 @@ TEST_F(TestLoadController, spawner_test_to_check_parameter_overriding_reverse)
684
680
685
681
TEST_F (TestLoadController, spawner_test_fallback_controllers)
686
682
{
687
- const std::string test_file_path = ament_index_cpp::get_package_prefix (" controller_manager" ) +
688
- " /test/test_controller_spawner_with_fallback_controllers.yaml" ;
683
+ const std::string test_file_path =
684
+ std::string (PARAMETERS_FILE_PATH) +
685
+ std::string (" test_controller_spawner_with_fallback_controllers.yaml" );
689
686
690
687
cm_->set_parameter (rclcpp::Parameter (" ctrl_1.type" , test_controller::TEST_CONTROLLER_CLASS_NAME));
691
688
cm_->set_parameter (rclcpp::Parameter (" ctrl_2.type" , test_controller::TEST_CONTROLLER_CLASS_NAME));
@@ -1031,8 +1028,8 @@ TEST_F(TestLoadControllerWithNamespacedCM, multi_ctrls_test_type_in_param)
1031
1028
1032
1029
TEST_F (TestLoadControllerWithNamespacedCM, spawner_test_type_in_params_file)
1033
1030
{
1034
- const std::string test_file_path = ament_index_cpp::get_package_prefix ( " controller_manager " ) +
1035
- " /test/ test_controller_spawner_with_type.yaml" ;
1031
+ const std::string test_file_path =
1032
+ std::string (PARAMETERS_FILE_PATH) + std::string ( " test_controller_spawner_with_type.yaml" ) ;
1036
1033
1037
1034
ControllerManagerRunner cm_runner (this );
1038
1035
// Provide controller type via the parsed file
@@ -1106,8 +1103,8 @@ TEST_F(TestLoadControllerWithNamespacedCM, spawner_test_type_in_params_file)
1106
1103
TEST_F (
1107
1104
TestLoadControllerWithNamespacedCM, spawner_test_type_in_params_file_deprecated_namespace_arg)
1108
1105
{
1109
- const std::string test_file_path = ament_index_cpp::get_package_prefix ( " controller_manager " ) +
1110
- " /test/ test_controller_spawner_with_type.yaml" ;
1106
+ const std::string test_file_path =
1107
+ std::string (PARAMETERS_FILE_PATH) + std::string ( " test_controller_spawner_with_type.yaml" ) ;
1111
1108
1112
1109
ControllerManagerRunner cm_runner (this );
1113
1110
// Provide controller type via the parsed file
@@ -1196,8 +1193,8 @@ TEST_F(
1196
1193
1197
1194
TEST_F (TestLoadControllerWithNamespacedCM, spawner_test_with_wildcard_entries_in_params_file)
1198
1195
{
1199
- const std::string test_file_path = ament_index_cpp::get_package_prefix ( " controller_manager " ) +
1200
- " /test/ test_controller_spawner_with_type.yaml" ;
1196
+ const std::string test_file_path =
1197
+ std::string (PARAMETERS_FILE_PATH) + std::string ( " test_controller_spawner_with_type.yaml" ) ;
1201
1198
1202
1199
ControllerManagerRunner cm_runner (this );
1203
1200
// Provide controller type via the parsed file
@@ -1263,8 +1260,8 @@ TEST_F(
1263
1260
TestLoadControllerWithNamespacedCM,
1264
1261
spawner_test_fail_namespaced_controllers_with_non_wildcard_entries)
1265
1262
{
1266
- const std::string test_file_path = ament_index_cpp::get_package_prefix ( " controller_manager " ) +
1267
- " /test/ test_controller_spawner_with_type.yaml" ;
1263
+ const std::string test_file_path =
1264
+ std::string (PARAMETERS_FILE_PATH) + std::string ( " test_controller_spawner_with_type.yaml" ) ;
1268
1265
1269
1266
ControllerManagerRunner cm_runner (this );
1270
1267
// Provide controller type via the parsed file
@@ -1303,11 +1300,11 @@ TEST_F(
1303
1300
1304
1301
TEST_F (TestLoadController, spawner_test_parsing_multiple_params_file)
1305
1302
{
1306
- const std::string test_file_path = ament_index_cpp::get_package_prefix ( " controller_manager " ) +
1307
- " /test/ test_controller_spawner_with_type.yaml" ;
1303
+ const std::string test_file_path =
1304
+ std::string (PARAMETERS_FILE_PATH) + std::string ( " test_controller_spawner_with_type.yaml" ) ;
1308
1305
const std::string fallback_test_file_path =
1309
- ament_index_cpp::get_package_prefix ( " controller_manager " ) +
1310
- " /test/ test_controller_spawner_with_fallback_controllers.yaml" ;
1306
+ std::string (PARAMETERS_FILE_PATH ) +
1307
+ std::string ( " test_controller_spawner_with_fallback_controllers.yaml" ) ;
1311
1308
1312
1309
cm_->set_parameter (rclcpp::Parameter (" ctrl_1.type" , test_controller::TEST_CONTROLLER_CLASS_NAME));
1313
1310
cm_->set_parameter (rclcpp::Parameter (" ctrl_2.type" , test_controller::TEST_CONTROLLER_CLASS_NAME));
@@ -1370,11 +1367,11 @@ TEST_F(TestLoadController, spawner_test_parsing_multiple_params_file)
1370
1367
1371
1368
TEST_F (TestLoadController, spawner_test_parsing_same_params_file_multiple_times)
1372
1369
{
1373
- const std::string test_file_path = ament_index_cpp::get_package_prefix ( " controller_manager " ) +
1374
- " /test/ test_controller_spawner_with_type.yaml" ;
1370
+ const std::string test_file_path =
1371
+ std::string (PARAMETERS_FILE_PATH) + std::string ( " test_controller_spawner_with_type.yaml" ) ;
1375
1372
const std::string fallback_test_file_path =
1376
- ament_index_cpp::get_package_prefix ( " controller_manager " ) +
1377
- " /test/ test_controller_spawner_with_fallback_controllers.yaml" ;
1373
+ std::string (PARAMETERS_FILE_PATH ) +
1374
+ std::string ( " test_controller_spawner_with_fallback_controllers.yaml" ) ;
1378
1375
1379
1376
cm_->set_parameter (rclcpp::Parameter (" ctrl_1.type" , test_controller::TEST_CONTROLLER_CLASS_NAME));
1380
1377
cm_->set_parameter (rclcpp::Parameter (" ctrl_2.type" , test_controller::TEST_CONTROLLER_CLASS_NAME));
0 commit comments