Skip to content

Commit 7fb75ee

Browse files
committed
fix: fix issue loading packages that have been prefixed
Signed-off-by: Esteve Fernandez <esteve.fernandez@tier4.jp>
1 parent 818b9f4 commit 7fb75ee

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

planning/autoware_behavior_velocity_planner/test/src/test_node_interface.cpp

+21-14
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,19 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
5454
const auto motion_velocity_smoother_dir =
5555
ament_index_cpp::get_package_share_directory("motion_velocity_smoother");
5656

57-
const auto get_behavior_velocity_module_config = [](const std::string & module) {
57+
// TODO(esteve): delete when all the modules are migrated to autoware_behavior_velocity_*
58+
const auto get_behavior_velocity_module_config_no_prefix = [](const std::string & module) {
5859
const auto package_name = "behavior_velocity_" + module + "_module";
5960
const auto package_path = ament_index_cpp::get_package_share_directory(package_name);
6061
return package_path + "/config/" + module + ".param.yaml";
6162
};
6263

64+
const auto get_behavior_velocity_module_config = [](const std::string & module) {
65+
const auto package_name = "autoware_behavior_velocity_" + module + "_module";
66+
const auto package_path = ament_index_cpp::get_package_share_directory(package_name);
67+
return package_path + "/config/" + module + ".param.yaml";
68+
};
69+
6370
std::vector<std::string> module_names;
6471
module_names.emplace_back("behavior_velocity_planner::CrosswalkModulePlugin");
6572
module_names.emplace_back("autoware::behavior_velocity_planner::WalkwayModulePlugin");
@@ -90,20 +97,20 @@ std::shared_ptr<BehaviorVelocityPlannerNode> generateNode()
9097
motion_velocity_smoother_dir + "/config/default_motion_velocity_smoother.param.yaml",
9198
motion_velocity_smoother_dir + "/config/Analytical.param.yaml",
9299
behavior_velocity_planner_dir + "/config/behavior_velocity_planner.param.yaml",
93-
get_behavior_velocity_module_config("blind_spot"),
94-
get_behavior_velocity_module_config("crosswalk"),
100+
get_behavior_velocity_module_config_no_prefix("blind_spot"),
101+
get_behavior_velocity_module_config_no_prefix("crosswalk"),
95102
get_behavior_velocity_module_config("walkway"),
96-
get_behavior_velocity_module_config("detection_area"),
97-
get_behavior_velocity_module_config("intersection"),
98-
get_behavior_velocity_module_config("no_stopping_area"),
99-
get_behavior_velocity_module_config("occlusion_spot"),
100-
get_behavior_velocity_module_config("run_out"),
101-
get_behavior_velocity_module_config("speed_bump"),
102-
get_behavior_velocity_module_config("stop_line"),
103-
get_behavior_velocity_module_config("traffic_light"),
104-
get_behavior_velocity_module_config("virtual_traffic_light"),
105-
get_behavior_velocity_module_config("out_of_lane"),
106-
get_behavior_velocity_module_config("no_drivable_lane")});
103+
get_behavior_velocity_module_config_no_prefix("detection_area"),
104+
get_behavior_velocity_module_config_no_prefix("intersection"),
105+
get_behavior_velocity_module_config_no_prefix("no_stopping_area"),
106+
get_behavior_velocity_module_config_no_prefix("occlusion_spot"),
107+
get_behavior_velocity_module_config_no_prefix("run_out"),
108+
get_behavior_velocity_module_config_no_prefix("speed_bump"),
109+
get_behavior_velocity_module_config_no_prefix("stop_line"),
110+
get_behavior_velocity_module_config_no_prefix("traffic_light"),
111+
get_behavior_velocity_module_config_no_prefix("virtual_traffic_light"),
112+
get_behavior_velocity_module_config_no_prefix("out_of_lane"),
113+
get_behavior_velocity_module_config_no_prefix("no_drivable_lane")});
107114

108115
// TODO(Takagi, Isamu): set launch_modules
109116
// TODO(Kyoichi Sugahara) set to true launch_virtual_traffic_light

0 commit comments

Comments
 (0)