Proper creation of junctions in RNDF for Maliput

Issue #139 on hold
Agustin Alba Chicar created an issue

Based on the Maliput document, we need to create proper segment grouping based on the junctions concept.

Comments (6)

  1. Agustin Alba Chicar reporter

    This issue might imply a big refactor in terms of the current implementation which has the concept of RNDF waypoints tightly related. At a glance we can find a first conflict with RNDF which can define two roads that intersect with each other but there is no logical connection between them. This is not a big issue for lanes - branch_points - segments but it is for junctions as there, at the physical intersection two cars may collide.

    Given that Maliput defines a geometry rather a logical connection, in fact there is no traffic direction defined for lanes, just the trajectory of roads, we should start migrating the logical road connection that RNDF presents to a geometric model. This is something similar to what Terminus does, but with less sophistication as we only need to support RNDF for the current model.

    In comparison with other formats, like OpenDrive, where the geometry and logical connections are defined, the idea of junction is provided directly in the map information. Also segments and lanes are explicitly defined in the map description. Beyond the geometric code, the implementation for this formats should be pretty straightforward.

  2. Agustin Alba Chicar reporter

    From a basic draft of the process can be:

    1.- Parse RNDF from the map and get the following structure:

    RNDF.png

    2.- Build a geometric model of the road geometry. We can base it on polylines first:

    GeometricModel?I.png

    We keep the connection road as red because it will give as a hint that the upper and lower segment should be connected.

    3.- Induce somehow where the connection points should be. For example based on the segments information, determine the point on the upper segment that has a minimum distance to the lower lane and then, at the middle distance draw a circle of radius R.

    Geometry_II.png

    4.- Determine the extents of the "junction zone" based on the intersection points of the circle.

    Geometry_III.png

    5.- With RNDF information, select the correct connections that should exist between the intersection points (green dots) and discard the others.

    Geometry_IV.png

    6.- Now we can create junctions as we can identify the collision zones:

    JunctionCreation.png

    For the previous process we can find some missing points. AFAIK, we lack of geometric support (at least) at Maliput level. We have math support from drake::math and Eigen libraries but at least we need support for lines and circles or implement them (I guess this is not the point).

    It would be useful to check wether or not to follow this approach with Drake team.

  3. Log in to comment