Skip to content

Map#

This page describes the interface of the Map component. See the Map component design for the concepts.

Autoware uses high-definition point cloud maps and vector maps of the driving environment. Before you launch Autoware, you must create the map files. See Creating maps.

The Map component loads the point cloud map, the Lanelet2 map, and the map projector info from files. Localization and Perception use the point cloud map. Perception, Planning, and Control use the Lanelet2 map. RViz shows the map markers.Point cloud map*.pcdLanelet2 map*.osmMap projector infomap_projector_info.yamlMapPoint cloud map loaderLanelet2 map loaderMap projection loaderLanelet2 map visualizerMap TF generatorProjectionPoint cloud mapsensor_msgs/msg/PointCloud2Lanelet2 mapautoware_map_msgs/msg/LaneletMapBinTFMarkersvisualization_msgs/msg/MarkerArrayLocalization, PerceptionPerception, Planning, ControlRViz
The main nodes of the Map component and the components that use the maps.

Inputs#

The Map component reads files. It does not subscribe to topics from other components.

NameFileDescription
Point cloud map*.pcd files, or a folder of themThe 3D point cloud map. Localization and Perception use it.
Point cloud map metadatapointcloud_map_metadata.yamlThe grid cells of a divided point cloud map. Partial and differential loading use it.
Lanelet2 map*.osm file, or a folder of themThe vector map in the Autoware Lanelet2 format.
Lanelet2 map metadatalanelet2_map_metadata.yamlThe grid cells of a divided Lanelet2 map. A Lanelet2 map in more than one file must have it. For a map in one file, the loader calculates the cell from the map if the file does not exist.
Map projector infomap_projector_info.yamlThe projection from latitude and longitude to the local map frame. If the file does not exist, the projection loader reads the Lanelet2 map. It uses MGRS if a point of the map has a latitude or longitude that is not zero. It uses Local if all points have zero latitude and longitude.

Outputs#

Map projector info#

The map_projection_loader node (executable autoware_map_projection_loader_node) publishes the projection of the map.

NameTopicTypeDescription
Map projector info/map/map_projector_infoautoware_map_msgs/msg/MapProjectorInfoThe projector type and its parameters. The types are MGRS, LocalCartesianUTM, LocalCartesian, TransverseMercator, and Local.

Point cloud map#

The pointcloud_map_loader node (executable autoware_pointcloud_map_loader) of the autoware_map_loader package loads the point cloud files. It sends the map to the other nodes in the configurations below. The parameter file of the node turns each configuration on or off. The metadata topic and the differential loading service are always on.

NameTopic or serviceTypeDefaultDescription
Whole point cloud map/map/pointcloud_mapsensor_msgs/msg/PointCloud2OnThe whole map in one message.
Point cloud map metadata/map/pointcloud_map_metadataautoware_map_msgs/msg/PointCloudMapMetaDataAlwaysThe cells of the map and their areas.
Partial point cloud map loading/map/get_partial_pointcloud_map (service)autoware_map_msgs/srv/GetPartialPointCloudMapOnReturns the cells that overlap a requested area.
Differential point cloud map loading/map/get_differential_pointcloud_map (service)autoware_map_msgs/srv/GetDifferentialPointCloudMapAlwaysReturns the cells in a requested area that the client does not have yet, and the cells to remove.
Selected point cloud map loading/map/get_selected_pointcloud_map (service)autoware_map_msgs/srv/GetSelectedPointCloudMapOffReturns the cells with the requested IDs.
Downsampled point cloud map/map/output/debug/downsampled_pointcloud_mapsensor_msgs/msg/PointCloud2OffThe whole map after a voxel grid filter, for visualization.

See the README of autoware_map_msgs for the area queries of these services.

Lanelet2 map#

The lanelet2_map_loader node (executable autoware_lanelet2_map_loader) of the autoware_map_loader package loads the Lanelet2 file and publishes it as one binary message. It projects the latitude and longitude of each point to the map frame with the map projector info.

NameTopic or serviceTypeDescription
Lanelet2 map/map/vector_mapautoware_map_msgs/msg/LaneletMapBinThe whole Lanelet2 map. The QoS durability is transient_local.
Lanelet2 map metadata/map/vector_map_metadataautoware_map_msgs/msg/LaneletMapMetaDataThe cells of a divided Lanelet2 map. Only with selected loading.
Selected Lanelet2 map loading/map/get_selected_vector_map (service)autoware_map_msgs/srv/GetSelectedLanelet2MapReturns the Lanelet2 map of the requested cells. Only with selected loading.

The LaneletMapBin message has these fields:

  • std_msgs/Header header
  • string version_map_format
  • string version_map
  • string name_map
  • uint8[] data

The GetSelectedLanelet2Map service has this request and response:

  • Request:
    • string[] cell_ids
  • Response:
    • std_msgs/Header header
    • autoware_map_msgs/LaneletMapBin lanelet2_cells

Note

Selected Lanelet2 map loading is off by default. To turn it on, set enable_selected_map_loading to true in the parameter file of the Lanelet2 map loader.

Lanelet2 map visualization#

The lanelet2_map_visualization node (executable autoware_lanelet2_map_visualizer) turns /map/vector_map into markers for RViz.

NameTopicTypeDescription
Lanelet2 map markers/map/vector_map_markervisualization_msgs/msg/MarkerArrayThe lanes, lines, and areas of the map.

Viewer frame#

The vector_map_tf_generator node (executable autoware_vector_map_tf_generator) publishes a static transform from map to viewer at the mean position of the points of the Lanelet2 map. RViz uses the viewer frame to show the map.

Map hash#

The map_hash_generator node of the autoware_map_loader package identifies the loaded map for applications outside Autoware. It calculates the SHA-256 hash of the Lanelet2 map file and of the point cloud map files once, when it starts. If the Lanelet2 map is a folder of files, the node leaves the Lanelet2 hash empty, and the Lanelet2 map XML service returns an empty text.

NameTopic or serviceTypeDescription
Map hash/api/autoware/get/map/info/hashtier4_external_api_msgs/msg/MapHashThe hashes of the map files. The QoS durability is transient_local.
Lanelet2 map XML/api/autoware/get/map/lanelet/xml (service)tier4_external_api_msgs/srv/GetTextFileReturns the content of the Lanelet2 map file as text.