Control launch files#
Overview#
The Autoware control stack starts with autoware.launch.xml, as the Launch Autoware page explains. If launch_control is true, autoware.launch.xml includes component_control.launch.xml of the autoware_launch package. This file includes control.launch.xml of the autoware_control_launch package. The following diagram shows the control launch flow in the autoware_launch repository.
Note
The Autoware project is a large project. Therefore, as we manage the Autoware project, we utilize specific arguments in the launch files. ROS 2 offers an argument-overriding feature for these launch files. Please refer to the official ROS 2 launch documentation for further information. For instance, if we define an argument at the top-level launch, it will override the value on lower-level launches.
component_control.launch.xml#
The component_control.launch.xml launch file is the main control launch file of the autoware_launch package. It includes control.launch.xml of autoware_control_launch. The parameter files are in the autoware_control_config package. control.launch.xml puts the composable nodes into two containers in the /control namespace: control_container and control_check_container. You can change the control launch arguments in component_control.launch.xml. These are some of its arguments:
lateral_controller_mode:This argument selects the lateral controller algorithm. The default value ismpc(MPC lateral controller). To change it to pure pursuit, update yourcomponent_control.launch.xmlfile:- <arg name="lateral_controller_mode" default="mpc"/> + <arg name="lateral_controller_mode" default="pure_pursuit"/>
use_individual_control_param:If this argument istrue, the lateral and longitudinal controllers read their parameters fromconfig/trajectory_follower/<vehicle_id>/ofautoware_control_config. The default value isfalse.
module_preset:This argument selects the module preset.autoware.launch.xmlgives it the value ofcontrol_module_preset. The default value isdefault, which selectsdefault_preset.yamlofautoware_control_config.
Module preset#
The preset file declares the launch arguments that enable or disable the control modules. These are some of its arguments:
launch_autonomous_emergency_braking:This argument enables autonomous emergency braking under specific conditions. For more information, see the Autonomous emergency braking (AEB) page. The default value istrue. To disable it, update the preset file:- arg: name: launch_autonomous_emergency_braking - default: "true" + default: "false"
launch_predicted_path_checker:This argument enables the predicted path checker module. For more information, see the Predicted Path Checker page. The default value isfalse. To enable it, update the preset file:- arg: name: launch_predicted_path_checker - default: "false" + default: "true"
trajectory_follower_mode:This argument selects the trajectory follower. The options aretrajectory_follower_node(the default),smart_mpc_trajectory_follower, andnone.
The preset file also has launch_lane_departure_checker, launch_control_validator, launch_collision_detector, launch_obstacle_collision_checker, launch_external_cmd_selector, launch_external_cmd_converter, and launch_control_evaluator.
Note
You can also use these arguments as command-line arguments:
ros2 launch autoware_launch autoware.launch.xml ... launch_predicted_path_checker:=true lateral_controller_mode:=pure_pursuit ...
Autoware 2.0.0 has no enable_autonomous_emergency_braking or enable_predicted_path_checker argument. The launch_autonomous_emergency_braking and launch_predicted_path_checker arguments of the preset replace them.
The parameters of each control module are in the autoware_control_config package, for example in config/trajectory_follower/lateral/mpc.param.yaml.