Skip to content

Commit

Permalink
feat(control_launch): organize controller param yaml (autowarefoundat…
Browse files Browse the repository at this point in the history
…ion#658)

* feat(control_launch): organize controller param yaml

Signed-off-by: Takayuki Murooka <[email protected]>

* fix

Signed-off-by: Takayuki Murooka <[email protected]>

* organize param files

Signed-off-by: Takayuki Murooka <[email protected]>

Signed-off-by: Takayuki Murooka <[email protected]>
  • Loading branch information
takayuki5168 authored Dec 26, 2022
1 parent 7ae6824 commit 0302028
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
9 changes: 6 additions & 3 deletions autoware_launch/launch/autoware.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,12 @@

<!-- Control -->
<group if="$(var launch_control)">
<include file="$(find-pkg-share control_launch)/launch/control.launch.xml">
<!-- options for lateral_controller_mode: mpc_follower, pure_pursuit -->
<arg name="lateral_controller_mode" value="mpc_follower"/>
<include file="$(find-pkg-share control_launch)/launch/control.launch.py">
<!-- options for lateral_controller_mode: mpc, pure_pursuit -->
<arg name="lateral_controller_mode" value="mpc"/>
<arg name="longitudinal_controller_mode" value="pid"/>
<arg name="lat_controller_param_path" value="$(find-pkg-share control_launch)/config/trajectory_follower/lateral/$(var lateral_controller_mode).param.yaml"/>
<arg name="lon_controller_param_path" value="$(find-pkg-share control_launch)/config/trajectory_follower/longitudinal/$(var longitudinal_controller_mode).param.yaml"/>
<arg name="check_external_emergency_heartbeat" value="$(var check_external_emergency_heartbeat)"/>
</include>
</group>
Expand Down
12 changes: 6 additions & 6 deletions control_launch/launch/control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def launch_setup(context, *args, **kwargs):
shift_decider_param = yaml.safe_load(f)["/**"]["ros__parameters"]

controller_component = ComposableNode(
package="trajectory_follower_nodes",
plugin="autoware::motion::control::trajectory_follower_nodes::Controller",
package="trajectory_follower_node",
plugin="autoware::motion::control::trajectory_follower_node::Controller",
name="controller_node_exe",
namespace="trajectory_follower",
remappings=[
Expand Down Expand Up @@ -260,8 +260,8 @@ def add_launch_arg(name: str, default_value=None, description=None):
# lateral controller mode
add_launch_arg(
"lateral_controller_mode",
"mpc_follower",
"lateral controller mode: `mpc_follower` or `pure_pursuit`",
"mpc",
"lateral controller mode: `mpc` or `pure_pursuit`",
)

# longitudinal controller mode
Expand All @@ -284,15 +284,15 @@ def add_launch_arg(name: str, default_value=None, description=None):
"lat_controller_param_path",
[
FindPackageShare("control_launch"),
"/config/trajectory_follower/mpc_follower.param.yaml",
"/config/mpc_lateral_controller/mpc_lateral_controller.param.yaml",
],
"path to the parameter file of lateral controller. default is `mpc_follower`",
)
add_launch_arg(
"lon_controller_param_path",
[
FindPackageShare("control_launch"),
"/config/trajectory_follower/longitudinal_controller.param.yaml",
"/config/pid_longitudinal_controller/pid_longitudinal_controller.param.yaml",
],
"path to the parameter file of longitudinal controller",
)
Expand Down
3 changes: 1 addition & 2 deletions control_launch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
<exec_depend>external_cmd_converter</exec_depend>
<exec_depend>lane_departure_checker</exec_depend>
<exec_depend>shift_decider</exec_depend>
<exec_depend>trajectory_follower</exec_depend>
<exec_depend>trajectory_follower_nodes</exec_depend>
<exec_depend>trajectory_follower_node</exec_depend>
<exec_depend>vehicle_cmd_gate</exec_depend>

<test_depend>ament_lint_auto</test_depend>
Expand Down

0 comments on commit 0302028

Please sign in to comment.