Skip to content

Initialize OSI Map interface

Xiao Pan requested to merge xiaopan/scenario_api:init_osi_map into imap_dev

This PR initializes the iMap-DataStructure as part of the iMap interface.

Update: 30.03.2023

Finalized architecture:

image

Following steps:

  • We would like to discuss whether to restructure the nested classes, e.g. Lane::Classification -> LaneClassifications, to improve readability.
  • Yet, how to keep linking to the OSI standards.
  • Discuss helper functions, e.g. ostream for debugging, search functions, builder functions, etc

Update 03.03.2023

Updates

  • Functional interfaces such as MapLoader, MapQuery are removed from this PR. So only data structure will be discussed within this thread.
  • The data structure has been refactored, so that does not strictly follow OSI architecture but aligns with all information presented in OSI.
  • Added an example to construct a map with lanes and lane-boundaries

Some of the comments from @nschick related to this update:

  • Lane boundaries are added as std::reference_wrapper instead of ids to a lane.
  • Still keep applying multi-boundaries for a lane but not limited to a single boundary lane structure. The reason is that:
    • Aligns the target (OSI) to the source map (OpenDrive/NDS).
    • It depends on which application, that multi-boundaries might be necessary for some other use cases. We don't want to limit this capability to potential uses.
    • It introduces additional logic to convert the logical map (OpenDrive/NDS) to the physical map. This logic is separated from the ODR-OSI conversion, so a post-convertion can be provided for this aim.

Map queries for discussion

  1. After summarizing all query functions from ASTAS/SimFwk, I noticed many map-direct queries are necessary and can be independent to whoever provides it, such as GetLaneById, GetLaneBoundaryById, GetTrafficLightById etc. I suggest adding them to the Map DataStructure to improve usability. However, it makes the interface not "head-only" anymore, implementations and tests should be provided as well.
  2. We may also provide a converter along with the release of the Map DataStructure that converts from/to a given version of OSI (e.g. 3.5). It helps to guard against the changes in the map data structure (ontology alignment). And also can be reused by consumers.

Update: 07.02.2023

The draft data structure strictly follows the OSI definition (Ver 3.5.0), incl. the nested structure of classes, and is implemented in the Plain Old Data (POD) structure.

Add interface

  • IMapLoader
  • ICoordinateConverter
  • IMapQuery
  • IMapValidator
Edited by Xiao Pan

Merge request reports