Skip to content

Map launch files#

Overview#

The Autoware map stack starts with autoware.launch.xml, as the Launch Autoware page explains. If launch_map is true, autoware.launch.xml includes component_map.launch.xml of the autoware_launch package. This file includes the launch files of the autoware_map_launch package. The following diagram shows the map launch flow in the autoware_launch repository.

autoware.launch.xml includes component_map.launch.xml of autoware_launch. It includes agnocast_env.launch.xml and, in the map namespace, five launch files of autoware_map_launch. Each launch file starts its nodes when its use_ argument is true, which is the default.autoware.launch.xmlautoware_launchcomponent_map.launch.xmlautoware_launchagnocast_env.launch.xmlautoware_agnocast_wrapperSelects the executor and givesld_preload_value to the nodesNamespace /mapLaunch files: autoware_map_launch. Parameter files: autoware_map_config.pointcloud_map_loader.launch.xmlautoware_map_launchpointcloud_map_loaderautoware_map_loaderlanelet2_map_loader.launch.xmlautoware_map_launchlanelet2_map_loaderautoware_map_loaderlanelet2_map_visualizationautoware_lanelet2_map_visualizervector_map_tf_generator.launch.xmlautoware_map_launchvector_map_tf_generatorautoware_map_tf_generatormap_hash_generator.launch.xmlautoware_map_launchmap_hash_generatorautoware_map_loadermap_projection_loader.launch.xmlautoware_map_launchmap_projection_loader.launch.xmlautoware_map_projection_loaderEach use_ argument is true by default. The nodes run as separate processes, not in a container.launch_map:=trueuse_pointcloud_mapuse_lanelet2_mapuse_map_tf_generatoruse_map_hash_generatoruse_map_projection
component_map.launch.xml includes five launch files of autoware_map_launch in the map namespace, and each one starts its map nodes.

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_map.launch.xml makes the paths of the map files from map_path, pointcloud_map_file, and lanelet2_map_file. It also gives the nodes the paths of pointcloud_map_metadata.yaml, lanelet2_map_metadata.yaml, and map_projector_info.yaml in map_path. Then, in the /map namespace, it starts these nodes:

ArgumentLaunch fileNodes
use_pointcloud_mappointcloud_map_loader.launch.xmlpointcloud_map_loader of autoware_map_loader
use_lanelet2_maplanelet2_map_loader.launch.xmllanelet2_map_loader of autoware_map_loader, and lanelet2_map_visualization of autoware_lanelet2_map_visualizer
use_map_tf_generatorvector_map_tf_generator.launch.xmlvector_map_tf_generator of autoware_map_tf_generator
use_map_hash_generatormap_hash_generator.launch.xmlmap_hash_generator of autoware_map_loader
use_map_projectionmap_projection_loader.launch.xmlThe map projection loader of autoware_map_projection_loader

All these arguments are true by default. In Autoware 2.0.0, the map nodes run as separate processes. They are not in a map_container any more. component_map.launch.xml also includes agnocast_env.launch.xml of autoware_agnocast_wrapper, which selects the executor of the nodes. The parameter files of the map nodes are in the autoware_map_config package.

You do not have many configuration choices in the map launch files, because the parameters are in the configuration files. But you can set the names of your point cloud map and your Lanelet2 map when you launch Autoware. The default values are pointcloud_map.pcd and lanelet2_map.osm. For example, to change the names of your map files, launch Autoware with these command-line arguments:

ros2 launch autoware_launch autoware.launch.xml ... pointcloud_map_file:=<YOUR-PCD-FILE-NAME> lanelet2_map_file:=<YOUR-LANELET2-MAP-NAME> ...

Or you can change them in your autoware.launch.xml launch file:

- <arg name="lanelet2_map_file" default="lanelet2_map.osm" description="lanelet2 map file name"/>
+ <arg name="lanelet2_map_file" default="<YOUR-LANELET2-MAP-NAME>" description="lanelet2 map file name"/>
- <arg name="pointcloud_map_file" default="pointcloud_map.pcd" description="pointcloud map file name"/>
+ <arg name="pointcloud_map_file" default="<YOUR-PCD-FILE-NAME>" description="pointcloud map file name"/>