Skip to content

Commit

Permalink
feat(behavior_path_planner): add enable_all_modules_auto_mode argumen…
Browse files Browse the repository at this point in the history
…t to launch files for behavior path planner modules (autowarefoundation#6093)

* Add enable_all_modules_auto_mode argument to launch files

Signed-off-by: kyoichi-sugahara <[email protected]>

* set default value for enable_all_modules_auto_mode

Signed-off-by: kyoichi-sugahara <[email protected]>

* fix enable_rtc configuration in scene_module_manager_interface.hpp

Signed-off-by: kyoichi-sugahara <[email protected]>

---------

Signed-off-by: kyoichi-sugahara <[email protected]>
  • Loading branch information
kyoichi-sugahara authored and tkimura4 committed Jan 23, 2024
1 parent dc169fc commit 0e0b12b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
6 changes: 5 additions & 1 deletion launch/tier4_planning_launch/launch/planning.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<arg name="freespace_planner_param_path"/>
<!-- planning validator -->
<arg name="planning_validator_param_path"/>
<!-- Auto mode setting-->
<arg name="enable_all_modules_auto_mode"/>

<group>
<push-ros-namespace namespace="planning"/>
Expand All @@ -21,7 +23,9 @@
<!-- scenario planning module -->
<group>
<push-ros-namespace namespace="scenario_planning"/>
<include file="$(find-pkg-share tier4_planning_launch)/launch/scenario_planning/scenario_planning.launch.xml"/>
<include file="$(find-pkg-share tier4_planning_launch)/launch/scenario_planning/scenario_planning.launch.xml">
<arg name="enable_all_modules_auto_mode" value="$(var enable_all_modules_auto_mode)"/>
</include>
</group>

<!-- planning validator -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<launch>
<arg name="enable_all_modules_auto_mode"/>

<!-- lane_driving scenario -->
<group>
<push-ros-namespace namespace="lane_driving"/>
Expand All @@ -8,6 +10,7 @@
<group>
<include file="$(find-pkg-share tier4_planning_launch)/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.xml">
<arg name="container_type" value="component_container_mt"/>
<arg name="enable_all_modules_auto_mode" value="$(var enable_all_modules_auto_mode)"/>
<!-- This condition should be true if run_out module is enabled and its detection method is Points -->
<arg name="launch_compare_map_pipeline" value="false"/>
</include>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<arg name="input_virtual_traffic_light_topic_name" default="/awapi/tmp/virtual_traffic_light_states"/>
<arg name="input_vector_map_topic_name" default="/map/vector_map"/>
<arg name="input_pointcloud_map_topic_name" default="/map/pointcloud_map"/>
<arg name="enable_all_modules_auto_mode"/>

<arg name="launch_avoidance_module" default="true"/>
<arg name="launch_avoidance_by_lane_change_module" default="true"/>
Expand Down Expand Up @@ -195,6 +196,7 @@
<param from="$(var vehicle_param_file)"/>
<param from="$(var nearest_search_param_path)"/>
<param name="launch_modules" value="$(var behavior_path_planner_launch_modules)"/>
<param name="enable_all_modules_auto_mode" value="$(var enable_all_modules_auto_mode)"/>
<param from="$(var behavior_path_planner_side_shift_module_param_path)"/>
<param from="$(var behavior_path_planner_avoidance_module_param_path)"/>
<param from="$(var behavior_path_planner_avoidance_by_lc_module_param_path)"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<launch>
<arg name="enable_all_modules_auto_mode"/>
<!-- scenario selector -->
<group>
<include file="$(find-pkg-share scenario_selector)/launch/scenario_selector.launch.xml">
Expand Down Expand Up @@ -50,7 +51,9 @@
<group>
<!-- lane driving -->
<group>
<include file="$(find-pkg-share tier4_planning_launch)/launch/scenario_planning/lane_driving.launch.xml"/>
<include file="$(find-pkg-share tier4_planning_launch)/launch/scenario_planning/lane_driving.launch.xml">
<arg name="enable_all_modules_auto_mode" value="$(var enable_all_modules_auto_mode)"/>
</include>
</group>
<!-- parking -->
<group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,14 @@ class SceneModuleManagerInterface
// init manager configuration
{
std::string ns = name_ + ".";
config_.enable_rtc = getOrDeclareParameter<bool>(*node, ns + "enable_rtc");
try {
config_.enable_rtc = getOrDeclareParameter<bool>(*node, "enable_all_modules_auto_mode")
? false
: getOrDeclareParameter<bool>(*node, ns + "enable_rtc");
} catch (const std::exception & e) {
config_.enable_rtc = getOrDeclareParameter<bool>(*node, ns + "enable_rtc");
}

config_.enable_simultaneous_execution_as_approved_module =
getOrDeclareParameter<bool>(*node, ns + "enable_simultaneous_execution_as_approved_module");
config_.enable_simultaneous_execution_as_candidate_module = getOrDeclareParameter<bool>(
Expand Down

0 comments on commit 0e0b12b

Please sign in to comment.