Main Content

roadrunner.hdmap.Junction

Create junctions in RoadRunner HD Map using MATLAB

Since R2022b

    Description

    A roadrunner.hdmap.Junction object enables you to define the structure for representing junctions in a RoadRunner HD Map scene model. Junctions represent a logical grouping of a set of lanes, typically involving a crossing (or convergence or divergence) between multiple roadways. Use this object to define the geometry and connectivity of lanes at a crossing between multiple roadways.

    Creation

    Description

    aJunction = roadrunner.hdmap.Junction() creates an empty lane junction.

    aJunction = roadrunner.hdmap.Junction(Name=Value) sets the properties of the junction using name-value pairs.

    example

    Properties

    expand all

    ID of the junction, specified as a character vector or string scalar.

    Example: rrMap.Junctions= roadrunner.hdmap.Junction(ID="Junction1") creates a junction with id Junction1 in a RoadRunner HD Map.

    Data Types: char | string

    Geometry of the junction object, specified as a matrix, with double precision values. The geometry of the junction object is represented by a set of non-overlapping polygons. The non-overlapping set can include polygons within holes of another polygon. A polygon has one exterior boundary, but it can have multiple holes within it. The matrix contains three-element vectors representing the polygons. For each polygon, the first vector contains the coordinates for the outer boundary of the polygon. The second vector contains the coordinates for the boundaries of holes within the polygon.

    Data Types: double

    ID of connecting lanes, specified as an array of roadrunner.hdmap.Reference (RoadRunner) objects. These lanes may connect topologically to other lanes enclosed in the junction. For example, a small roundabout (mini-circle) could be comprised of a single junction whose enclosed lanes include a ring formation.

    Examples

    collapse all

    Create an empty RoadRunner HD Map by calling the roadrunnerHDMap object.

    rrMap = roadrunnerHDMap()
    rrMap = 
      roadrunnerHDMap with properties:
    
                    Author: ""
                Projection: ""
        GeographicBoundary: [0×3 double]
                     Lanes: [0×1 roadrunner.hdmap.Lane]
            LaneBoundaries: [0×1 roadrunner.hdmap.LaneBoundary]
                LaneGroups: [0×1 roadrunner.hdmap.LaneGroup]
              LaneMarkings: [0×1 roadrunner.hdmap.LaneMarking]
                 Junctions: [0×1 roadrunner.hdmap.Junction]
              BarrierTypes: [0×1 roadrunner.hdmap.BarrierType]
                  Barriers: [0×1 roadrunner.hdmap.Barrier]
                 SignTypes: [0×1 roadrunner.hdmap.SignType]
                     Signs: [0×1 roadrunner.hdmap.Sign]
    
    

    Create the road lane marking using the roadrunner.hdmap.Junction object. Specify the junction information for the junction id.

    rrMap.Junctions = roadrunner.hdmap.Junction(ID="Junction1")
    rrMap = 
      roadrunnerHDMap with properties:
    
                    Author: ""
                Projection: ""
        GeographicBoundary: [0×3 double]
                     Lanes: [0×1 roadrunner.hdmap.Lane]
            LaneBoundaries: [0×1 roadrunner.hdmap.LaneBoundary]
                LaneGroups: [0×1 roadrunner.hdmap.LaneGroup]
              LaneMarkings: [0×1 roadrunner.hdmap.LaneMarking]
                 Junctions: [1×1 roadrunner.hdmap.Junction]
              BarrierTypes: [0×1 roadrunner.hdmap.BarrierType]
                  Barriers: [0×1 roadrunner.hdmap.Barrier]
                 SignTypes: [0×1 roadrunner.hdmap.SignType]
                     Signs: [0×1 roadrunner.hdmap.Sign]
    
    

    Version History

    Introduced in R2022b