Skip to content

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.

autoware.launch.xml includes component_control.launch.xml, which includes control.launch.xml of autoware_control_launch. control.launch.xml reads a module preset of autoware_control_config. In the control namespace it includes the trajectory follower, the command gate, the external command, and the control checker launch files, and the control evaluator.autoware.launch.xmlautoware_launchcomponent_control.launch.xmlautoware_launchlateral_controller_mode: mpc (default) or pure_pursuitlongitudinal_controller_mode: pidcontrol_module_preset: defaultcontrol.launch.xmlautoware_control_launchpreset/default_preset.yamlautoware_control_config: the launch_* argumentsNamespace /controltrajectory_followertrajectory_follower.launch.xmlautoware_control_launchcontroller_node_exeautoware_trajectory_follower_nodeComposable node, for the default modepympc_trajectory_follower.pyautoware_smart_mpc_trajectory_followerMode smart_mpc_trajectory_followerlane_departure_checker_nodeautoware_lane_departure_checkerIf launch_lane_departure_checker is truecommand_gatecommand_gate.launch.xmlautoware_control_launchvehicle_cmd_gateautoware_vehicle_cmd_gateComposable node, unless use_control_command_gateoperation_mode_transition_managerautoware_operation_mode_transition_managerComposable nodeautoware_shift_deciderautoware_shift_deciderNodecontrol_command_gate, stop_mode_operatorLaunch files of their autoware_ packagesIf use_control_command_gate is trueexternal_commandexternal_command.launch.xmlautoware_control_launchexternal_cmd_selector.launch.pyautoware_external_cmd_selectorIf launch_external_cmd_selector is trueexternal_cmd_converter.launch.pyautoware_external_cmd_converterIf launch_external_cmd_converter is truecontrol_checkercontrol_checker.launch.xmlautoware_control_launchcontrol_validatorautoware_control_validatorIf launch_control_validator is trueautonomous_emergency_brakingautoware_autonomous_emergency_brakingIf launch_autonomous_emergency_braking is truecollision_detectorautoware_collision_detectorIf launch_collision_detector is trueobstacle_collision_checkerautoware_obstacle_collision_checkerIf launch_obstacle_collision_checker is truepredicted_path_checkerautoware_predicted_path_checkerIf launch_predicted_path_checker is truecontrol_evaluator.launch.xmlautoware_control_evaluator, if launch_control_evaluator is trueContainers: control_container and control_check_container. The parameter files are in autoware_control_config.Default values come from default_preset.yaml: the gray boxes are off by default.launch_control:=trueincludes
control.launch.xml reads a module preset and includes the trajectory follower, command gate, external command, and control checker launch files.

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 is mpc (MPC lateral controller). To change it to pure pursuit, update your component_control.launch.xml file:

    - <arg name="lateral_controller_mode" default="mpc"/>
    + <arg name="lateral_controller_mode" default="pure_pursuit"/>
    
  • use_individual_control_param: If this argument is true, the lateral and longitudinal controllers read their parameters from config/trajectory_follower/<vehicle_id>/ of autoware_control_config. The default value is false.
  • module_preset: This argument selects the module preset. autoware.launch.xml gives it the value of control_module_preset. The default value is default, which selects default_preset.yaml of autoware_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 is true. 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 is false. 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 are trajectory_follower_node (the default), smart_mpc_trajectory_follower, and none.

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.