tum-gis / rtron

r:trån is a road space model transformer library for OpenDRIVE, CityGML and beyond
https://rtron.io
Apache License 2.0
50 stars 12 forks source link

Missing connections to bidirectional TrafficSpace objects #37

Closed CodeMazeSolver closed 1 year ago

CodeMazeSolver commented 1 year ago

Current situation

image

The screenshot shows a narrow part of a road in the Grafing dataset. Here, two lanes in different directions have to share the road in a single element for a short distance due to a bottleneck. The lane on top is connected correctly as its the primary connection path in this example. However, the lane on the bottom gets narrower and narrower closer to the bidirectional segment. This leads to a dead end with no connection between the two ends of the lower lane.

Proposed solution

image

As can be seen in the added red connections additional predecessor and successor connections to the bidirectional elements would be sufficient to remove the dead ends. Additionally, it might be necessary to set additional predecessor and successor connections in the opposite direction, as a bidirectional element can be traversed in both directions.

benediktschwab commented 1 year ago

As the traffic space (represented by the green line) originates from an OpenDRIVE lane of type bidirectional, I enhanced rtron to add predecessors and successors in both directions.

Your red connection (north-west) is denoting a lane change onto the opposing lane since the OpenDRIVE road reference line and center lane is running in between the two driving lanes. In the OpenDRIVE dataset, the lane is indeed a dead end (with no successor) and then restarts (with no predecessor). Does this help you?