Skip to content

Feat: add logical lane and boundary conversion in datawrapper

This PR provides a solution for converting logical lanes and logical lane boundaries from mapapi to gtgenmap, while also addressing reference refresh issues. Another approach to implement this feature would be to let the map data wrapper directly own the unique pointer to mapapi data. For some detailed discussions, please refer to the previously drafted PR. (Thanks for the support!)

Explanation of the Conversion Logic:

  1. Adding Logical Lane & Logical Lane Boundary: Logical lanes and lane boundaries are added to the map data wrapper through Add() fucntion.
  2. Refreshing References in the Add Function: In the Add function, references and pointers in the logical lane boundaries are refreshed directly.
  3. Refreshing Logical Lanes in a Separate Function: Logical lanes are refreshed in a separate function, where the physicalLaneReference vector and LogicalLaneRelation vector are first cleared and then updated with the new structure. The reason this logic is not placed in the Add function is that some references in LogicalLane data structure point to other logical lanes. Therefore, all logical lanes need to be added to the data wrapper first and then refreshed to ensure that all necessary lanes can be found within the data wrapper.

Additional Reference: Integration tests within gt-gen-simulator using this logic have also been conducted locally (for reference).

Edited by Ziqi Zhou

Merge request reports

Loading