Skip to content

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.

autoware.launch.xml includes component_planning.launch.xml, which includes planning.launch.xml of autoware_planning_launch. planning.launch.xml reads a module preset of autoware_planning_config. In the planning namespace it includes mission planning, scenario planning or the diffusion planner as planning_setting selects, the planning validator, the planning evaluator, and the remaining distance and time calculator.autoware.launch.xmlautoware_launchcomponent_planning.launch.xmlautoware_launchplanning.launch.xmlautoware_planning_launchpreset/default_preset.yamlautoware_planning_config: the launch_* argumentsNamespace /planningmission_planningmanual_lane_change_handler.launch.xmlautoware_manual_lane_change_handlermission_planning.launch.xmlmission_planner, goal_pose_visualizerplanning_setting:=rule_based (the default): namespace scenario_planningscenario_planning.launch.xmlautoware_planning_launchscenario_selector.launch.xmlautoware_scenario_selectorexternal_velocity_limit_selector.launch.xmlautoware_external_velocity_limit_selectorvelocity_smootherNode of autoware_velocity_smootherhazard_lights_selector.launch.xmlautoware_hazard_lights_selectorlane_driving.launch.xmlNamespace lane_driving, autoware_planning_launchbehavior_planning.launch.xmlbehavior_path_planner or path_generator,and behavior_velocity_plannermotion_planning.launch.xmlpath smoother, path optimizer or path sampler,motion_velocity_planner, surround_obstacle_checkerparking.launch.xmlcostmap_generator and freespace_planner,if launch_parking_module is trueplanning_setting:=diffusion_plannerlearning_based_planning/diffusion_planner.launch.xmlautoware_diffusion_planner and autoware_trajectory_modifier, in the namespace trajectory_generatorValidator, evaluator, and calculatorplanning_validator.launch.xmlautoware_planning_validatorOutput: /planning/trajectoryplanning_evaluator.launch.xmlautoware_planning_evaluatorremaining_distance_time_calculator.launch.xmlautoware_remaining_distance_time_calculator, if launch_remaining_distance_time_calculator is true (true in default_preset.yaml)launch_planning:=trueplanning_module_preset, planning_settingincludes
planning.launch.xml reads a module preset and includes mission planning, the trajectory source that planning_setting selects, and the planning validator.

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. With rule_based (the default), the scenario planning modules make the trajectory. With diffusion_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.xml includes the file config/preset/<planning_module_preset>_preset.yaml of autoware_planning_config. The default value is default, which selects default_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 are true by 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 is false. 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 from JerkFiltered to L2, 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/.