Planning launch files#
Overview#
The Autoware planning stack starts with autoware.launch.xml, as the Launch Autoware page explains. If launch_planning is true, autoware.launch.xml includes component_planning.launch.xml of the autoware_launch package. This file includes planning.launch.xml of the autoware_planning_launch package. The following diagram shows the planning 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_planning.launch.xml#
The component_planning.launch.xml launch file is the main planning launch file of the autoware_launch package. It includes planning.launch.xml of autoware_planning_launch. The parameter files are in the autoware_planning_config package. component_planning.launch.xml gives these arguments of autoware.launch.xml to the planning launch files:
planning_setting:This argument selects the source of the trajectory. Withrule_based(the default), the scenario planning modules make the trajectory. Withdiffusion_planner, the learned Diffusion Planner makes it. In both cases, the planning validator checks the trajectory and publishes/planning/trajectory.planning_module_preset:This argument selects the module preset.planning.launch.xmlincludes the fileconfig/preset/<planning_module_preset>_preset.yamlofautoware_planning_config. The default value isdefault, which selectsdefault_preset.yaml.
Module preset#
The preset file declares the launch arguments that enable or disable the planning modules. For more information, see how to enable or disable a planning module. These are some of its arguments:
launch_obstacle_cruise_module:This argument enables the obstacle cruise module of the motion velocity planner. The motion velocity planner also has the obstacle stop module (launch_obstacle_stop_module) and the obstacle slow down module (launch_obstacle_slow_down_module). All three aretrueby default. To disable the obstacle cruise module, change the preset file:- arg: name: launch_obstacle_cruise_module - default: "true" + default: "false"
launch_surround_obstacle_checker:This argument enables the surround_obstacle_checker. The default value isfalse. To enable it, change the preset file:- arg: name: launch_surround_obstacle_checker - default: "false" + default: "true"
velocity_smoother_type:This argument selects the type of the smoother of the velocity_smoother package. For the available smoother types, see its documentation. For example, to change the smoother type fromJerkFilteredtoL2, change the preset file:- arg: name: velocity_smoother_type - default: JerkFiltered + default: L2
Note
You can also use these arguments as command-line arguments:
ros2 launch autoware_launch autoware.launch.xml ... launch_surround_obstacle_checker:=true velocity_smoother_type:=L2 ...
Autoware 2.0.0 has no use_experimental_lane_change_function, cruise_planner_type, or use_surround_obstacle_check argument. The preset arguments above replace the last two. use_experimental_lane_change_function changed the collision check of the lane change module. Its options are now lane change parameters, for example use_all_predicted_paths in the collision_check section of config/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/lane_change/lane_change.param.yaml of autoware_planning_config.
To keep your changes apart from the default preset, copy default_preset.yaml to a new file, for example my_preset.yaml, in the same directory. Build autoware_planning_config again, so that the install directory has the new file. Then launch Autoware with planning_module_preset:=my.
The parameters of each planning module are in the autoware_planning_config package, for example in config/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/.