Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tier4_planning_launch): declare param path argument #1337

Merged
merged 3 commits into from
Jul 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions launch/tier4_planning_launch/launch/planning.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

<arg name="vehicle_info_param_file"/>

<!-- parameter path -->
<arg name="tier4_planning_launch_param_path" default="$(find-pkg-share tier4_planning_launch)/config" description="tier4_planning_launch parameter path"/>

<!-- pointcloud container -->
<arg name="use_pointcloud_container" default="false"/>
<arg name="pointcloud_container_name" default="pointcloud_container"/>
Expand All @@ -22,6 +25,7 @@
<arg name="vehicle_info_param_file" value="$(var vehicle_info_param_file)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="tier4_planning_launch_param_path" value="$(var tier4_planning_launch_param_path)"/>
</include>
</group>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<launch>
<!-- common param -->
<arg name="tier4_planning_launch_param_path"/>
<arg name="common_param_path"/>
<arg name="vehicle_info_param_file"/>

Expand All @@ -17,6 +18,7 @@
<include file="$(find-pkg-share tier4_planning_launch)/launch/scenario_planning/lane_driving/behavior_planning/behavior_planning.launch.py">
<arg name="vehicle_info_param_file" value="$(var vehicle_info_param_file)"/>
<arg name="use_multithread" value="true"/>
<arg name="tier4_planning_launch_param_path" value="$(var tier4_planning_launch_param_path)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="container_name" value="$(var pointcloud_container_name)"/>
</include>
Expand All @@ -37,6 +39,7 @@
<push-ros-namespace namespace="motion_planning"/>
<include file="$(find-pkg-share tier4_planning_launch)/launch/scenario_planning/lane_driving/motion_planning/motion_planning.launch.py">
<arg name="vehicle_info_param_file" value="$(var vehicle_info_param_file)"/>
<arg name="tier4_planning_launch_param_path" value="$(var tier4_planning_launch_param_path)"/>
<arg name="use_multithread" value="true"/>
</include>
</group>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import os

from ament_index_python.packages import get_package_share_directory
import launch
from launch.actions import DeclareLaunchArgument
from launch.actions import ExecuteProcess
Expand Down Expand Up @@ -42,8 +41,7 @@ def launch_setup(context, *args, **kwargs):

# behavior path planner
side_shift_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -55,8 +53,7 @@ def launch_setup(context, *args, **kwargs):
side_shift_param = yaml.safe_load(f)["/**"]["ros__parameters"]

avoidance_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -68,8 +65,7 @@ def launch_setup(context, *args, **kwargs):
avoidance_param = yaml.safe_load(f)["/**"]["ros__parameters"]

lane_change_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -81,8 +77,7 @@ def launch_setup(context, *args, **kwargs):
lane_change_param = yaml.safe_load(f)["/**"]["ros__parameters"]

lane_following_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -94,8 +89,7 @@ def launch_setup(context, *args, **kwargs):
lane_following_param = yaml.safe_load(f)["/**"]["ros__parameters"]

pull_over_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -107,8 +101,7 @@ def launch_setup(context, *args, **kwargs):
pull_over_param = yaml.safe_load(f)["/**"]["ros__parameters"]

pull_out_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -120,8 +113,7 @@ def launch_setup(context, *args, **kwargs):
pull_out_param = yaml.safe_load(f)["/**"]["ros__parameters"]

behavior_path_planner_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand Down Expand Up @@ -193,8 +185,7 @@ def launch_setup(context, *args, **kwargs):

# smoother param
common_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"common",
"common.param.yaml",
Expand All @@ -203,8 +194,7 @@ def launch_setup(context, *args, **kwargs):
common_param = yaml.safe_load(f)["/**"]["ros__parameters"]

motion_velocity_smoother_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"common",
"motion_velocity_smoother",
Expand All @@ -214,8 +204,7 @@ def launch_setup(context, *args, **kwargs):
motion_velocity_smoother_param = yaml.safe_load(f)["/**"]["ros__parameters"]

smoother_type_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"common",
"motion_velocity_smoother",
Expand All @@ -226,8 +215,7 @@ def launch_setup(context, *args, **kwargs):

# behavior velocity planner
blind_spot_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -238,8 +226,7 @@ def launch_setup(context, *args, **kwargs):
blind_spot_param = yaml.safe_load(f)["/**"]["ros__parameters"]

crosswalk_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -250,8 +237,7 @@ def launch_setup(context, *args, **kwargs):
crosswalk_param = yaml.safe_load(f)["/**"]["ros__parameters"]

detection_area_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -262,8 +248,7 @@ def launch_setup(context, *args, **kwargs):
detection_area_param = yaml.safe_load(f)["/**"]["ros__parameters"]

intersection_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -274,8 +259,7 @@ def launch_setup(context, *args, **kwargs):
intersection_param = yaml.safe_load(f)["/**"]["ros__parameters"]

stop_line_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -286,8 +270,7 @@ def launch_setup(context, *args, **kwargs):
stop_line_param = yaml.safe_load(f)["/**"]["ros__parameters"]

traffic_light_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -298,8 +281,7 @@ def launch_setup(context, *args, **kwargs):
traffic_light_param = yaml.safe_load(f)["/**"]["ros__parameters"]

virtual_traffic_light_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -310,8 +292,7 @@ def launch_setup(context, *args, **kwargs):
virtual_traffic_light_param = yaml.safe_load(f)["/**"]["ros__parameters"]

occlusion_spot_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -322,8 +303,7 @@ def launch_setup(context, *args, **kwargs):
occlusion_spot_param = yaml.safe_load(f)["/**"]["ros__parameters"]

no_stopping_area_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -334,8 +314,7 @@ def launch_setup(context, *args, **kwargs):
no_stopping_area_param = yaml.safe_load(f)["/**"]["ros__parameters"]

run_out_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand All @@ -346,8 +325,7 @@ def launch_setup(context, *args, **kwargs):
run_out_param = yaml.safe_load(f)["/**"]["ros__parameters"]

behavior_velocity_planner_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"behavior_planning",
Expand Down Expand Up @@ -506,6 +484,8 @@ def add_launch_arg(name: str, default_value=None, description=None):
)
add_launch_arg("map_topic_name", "/map/vector_map", "input topic of map")

add_launch_arg("tier4_planning_launch_param_path", None, "tier4_planning_launch parameter path")

# component
add_launch_arg("use_intra_process", "false", "use ROS2 component container communication")
add_launch_arg("use_multithread", "false", "use multithread")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import os

from ament_index_python.packages import get_package_share_directory
import launch
from launch.actions import DeclareLaunchArgument
from launch.actions import GroupAction
Expand All @@ -39,8 +38,7 @@ def launch_setup(context, *args, **kwargs):

# planning common param path
common_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"common",
"common.param.yaml",
Expand All @@ -50,8 +48,7 @@ def launch_setup(context, *args, **kwargs):

# obstacle avoidance planner
obstacle_avoidance_planner_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"motion_planning",
Expand Down Expand Up @@ -81,8 +78,7 @@ def launch_setup(context, *args, **kwargs):

# surround obstacle checker
surround_obstacle_checker_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"motion_planning",
Expand Down Expand Up @@ -120,17 +116,15 @@ def launch_setup(context, *args, **kwargs):

# obstacle stop planner
obstacle_stop_planner_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"motion_planning",
"obstacle_stop_planner",
"obstacle_stop_planner.param.yaml",
)
obstacle_stop_planner_acc_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"motion_planning",
Expand Down Expand Up @@ -175,8 +169,7 @@ def launch_setup(context, *args, **kwargs):

# obstacle cruise planner
obstacle_cruise_planner_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"lane_driving",
"motion_planning",
Expand Down Expand Up @@ -296,6 +289,8 @@ def add_launch_arg(name: str, default_value=None, description=None):
"cruise_planner", "obstacle_stop_planner", "cruise planner type"
) # select from "obstacle_stop_planner", "obstacle_cruise_planner", "none"

add_launch_arg("tier4_planning_launch_param_path", None, "tier4_planning_launch parameter path")

add_launch_arg("use_intra_process", "false", "use ROS2 component container communication")
add_launch_arg("use_multithread", "false", "use multithread")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

import os

from ament_index_python.packages import get_package_share_directory
import launch
from launch.actions import DeclareLaunchArgument
from launch.actions import GroupAction
Expand All @@ -37,8 +36,7 @@ def launch_setup(context, *args, **kwargs):
vehicle_info_param = yaml.safe_load(f)["/**"]["ros__parameters"]

freespace_planner_param_path = os.path.join(
get_package_share_directory("tier4_planning_launch"),
"config",
LaunchConfiguration("tier4_planning_launch_param_path").perform(context),
"scenario_planning",
"parking",
"freespace_planner",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<launch>
<!-- common param -->
<arg name="common_param_path" default="$(find-pkg-share tier4_planning_launch)/config/scenario_planning/common/common.param.yaml"/>
<arg name="tier4_planning_launch_param_path"/>
kminoda marked this conversation as resolved.
Show resolved Hide resolved
<arg name="common_param_path" default="$(var tier4_planning_launch_param_path)/scenario_planning/common/common.param.yaml"/>
<arg name="vehicle_info_param_file"/>

<!-- pointcloud container -->
Expand All @@ -23,7 +24,7 @@

<!-- velocity planning with max velocity, acceleration, jerk, stop point constraint -->
<group>
<arg name="param_path" default="$(find-pkg-share tier4_planning_launch)/config/scenario_planning/common/motion_velocity_smoother/motion_velocity_smoother.param.yaml"/>
<arg name="param_path" default="$(var tier4_planning_launch_param_path)/scenario_planning/common/motion_velocity_smoother/motion_velocity_smoother.param.yaml"/>
<!-- external velocity limit selector -->
<group>
<include file="$(find-pkg-share external_velocity_limit_selector)/launch/external_velocity_limit_selector.launch.xml">
Expand All @@ -40,7 +41,7 @@
<arg name="smoother_type" value="$(var smoother_type)"/>
<arg name="common_param_path" value="$(var common_param_path)"/>
<arg name="param_path" value="$(var param_path)"/>
<arg name="smoother_param_path" value="$(find-pkg-share tier4_planning_launch)/config/scenario_planning/common/motion_velocity_smoother/$(var smoother_type).param.yaml"/>
<arg name="smoother_param_path" value="$(var tier4_planning_launch_param_path)/scenario_planning/common/motion_velocity_smoother/$(var smoother_type).param.yaml"/>
</include>
</group>
</group>
Expand All @@ -54,6 +55,7 @@
<arg name="vehicle_info_param_file" value="$(var vehicle_info_param_file)"/>
<arg name="use_pointcloud_container" value="$(var use_pointcloud_container)"/>
<arg name="pointcloud_container_name" value="$(var pointcloud_container_name)"/>
<arg name="tier4_planning_launch_param_path" value="$(var tier4_planning_launch_param_path)"/>
</include>
</group>
<!-- parking -->
Expand Down