Launch files#
Overview#
Autoware use ROS 2 launch system to startup the software. Please see the official documentation to get a basic understanding about ROS 2 Launch system if you are not familiar with it.
Guideline#
The organization of launch files in Autoware#
Autoware distinguishes between the reusable node implementations and their example integration, including system-specific configurations, pipelines, and system topologies.
- Reusable node implementations can be found in
autoware_coreandautoware_universeautoware_corerepository itself provides a minimal integration in the package namedautoware_core.
- An integrated system example orchestrated from these nodes can be found in
autoware_launch.- There are many possible ways to construct a full autonomous driving system, and
autoware_launchprovides one, highly configurable reference integration.
- There are many possible ways to construct a full autonomous driving system, and
The package autoware_launch itself provides the general entrypoint to call other modularized launch files and start the Autoware nodes.
-
The
autoware.launch.xmlis the basic launch file for road driving scenarios.This launch file loads other launch files for different modules, including Vehicle, System, Map, Sensing, Localization, Perception, Planning, Control, etc. By setting the
launch_*argument to eithertrueorfalse, the users can selectively load a subset of the system.
- The
logging_simulator.launch.xmlis often used together with the recorded ROS bag to debug if the target module (e.g, Sensing, Localization or Perception) functions normally.
- The
planning_simulator.launch.xmlis based on the Planning Simulator tool, mainly used for testing/validation of Planning module by simulating traffic rules, interactions with dynamic objects and control commands to the ego vehicle.
- The
e2e_simulator.launch.xmlis the launcher for digital twin simulation environment.
graph LR
A11[logging_simulator.launch.xml]-.->A10[autoware.launch.xml]
A12[planning_simulator.launch.xml]-.->A10[autoware.launch.xml]
A13[e2e_simulator.launch.xml]-.->A10[autoware.launch.xml]
A10-->A21[tier4_map_component.launch.xml]
A10-->A22[xxx.launch.py]
A10-->A23[tier4_localization_component.launch.xml]
A10-->A24[xxx.launch.xml]
A10-->A25[tier4_sensing_component.launch.xml]
A23-->A30[localization.launch.xml]
A30-->A31[pose_estimator.launch.xml]
A30-->A32[util.launch.xml]
A30-->A33[pose_twist_fusion_filter.launch.xml]
A30-->A34[xxx.launch.xml]
A30-->A35[twist_estimator.launch.xml]
A33-->A41[stop_filter.launch.xml]
A33-->A42[ekf_localizer.launch.xml]
A33-->A43[twist2accel.launch.xml]
Add a new package in Autoware#
If a newly created package has executable node, we expect example launch files and configurations within the package, just like the recommended structure shown in the previous directory structure page.
Integrate a new package in autoware_launch#
In order to automatically load the newly added package (in autoware_core or autoware_universe) when starting Autoware, you need to make some necessary changes to the corresponding launch file.
Parameter and system topology management#
Another purpose of introducing the autoware_launch repository is to facilitate the parameter and system topology management of Autoware.
Suppose that we want to integrate Autoware based on autoware_launch to a specific vehicle, and that we are only interested in different parameters and possibly different node configurations, without rewriting the existing node implementations.
In such case, we can fork only autoware_launch to customize the parameters or the pipelines, without modifying the official autoware_universe.
Taking the localization module as an example, in the autoware_launch repository:
- all the launch parameter files for the localization component are listed in the files under
autoware_launch/config/localization. - the launch parameter file paths are set in the
autoware_launch/launch/components/tier4_localization_component.launch.xml. - in
tier4_universe_launch/tier4_localization_launch/launch, the launch files loads the launch parameter files if the argument is given in the parameter configuration file. You can still use the default parameters in each packages to launchtier4_localization_launch.
See sync-params to learn how these launch parameter files can be updated.