Main Content

roadrunner.hdmap.Junction

Define junction 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

    junction = roadrunner.hdmap.Junction creates an empty lane junction.

    junction = roadrunner.hdmap.Junction(Name=Value) sets the properties of the junction using one or more name-value arguments. For example, ID="Junction1" specifies the ID of the junction as "Junction1".

    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 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.

    Since R2025a

    Configurations of traffic signal phases at the junction, specified as an array of roadrunner.hdmap.JunctionConfiguration objects. Specifying multiple configurations enables a junction to have various phase presets, such as all signals blinking red or a split phase setup. Simulators can dynamically switch or select between these presets.

    Examples

    collapse all

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

    rrMap = roadrunnerHDMap()
    rrMap = 
      roadrunnerHDMap with properties:
    
                     Author: ""
               GeoReference: [0 0]
         GeographicBoundary: []
                      Lanes: [0×1 roadrunner.hdmap.Lane]
                SpeedLimits: [0×1 roadrunner.hdmap.SpeedLimit]
             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]
          StaticObjectTypes: [0×1 roadrunner.hdmap.StaticObjectType]
              StaticObjects: [0×1 roadrunner.hdmap.StaticObject]
        StencilMarkingTypes: [0×1 roadrunner.hdmap.StencilMarkingType]
            StencilMarkings: [0×1 roadrunner.hdmap.StencilMarking]
          CurveMarkingTypes: [0×1 roadrunner.hdmap.CurveMarkingType]
              CurveMarkings: [0×1 roadrunner.hdmap.CurveMarking]
                SignalTypes: [0×1 roadrunner.hdmap.SignalType]
                    Signals: [0×1 roadrunner.hdmap.Signal]
    
    

    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: ""
               GeoReference: [0 0]
         GeographicBoundary: []
                      Lanes: [0×1 roadrunner.hdmap.Lane]
                SpeedLimits: [0×1 roadrunner.hdmap.SpeedLimit]
             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]
          StaticObjectTypes: [0×1 roadrunner.hdmap.StaticObjectType]
              StaticObjects: [0×1 roadrunner.hdmap.StaticObject]
        StencilMarkingTypes: [0×1 roadrunner.hdmap.StencilMarkingType]
            StencilMarkings: [0×1 roadrunner.hdmap.StencilMarking]
          CurveMarkingTypes: [0×1 roadrunner.hdmap.CurveMarkingType]
              CurveMarkings: [0×1 roadrunner.hdmap.CurveMarking]
                SignalTypes: [0×1 roadrunner.hdmap.SignalType]
                    Signals: [0×1 roadrunner.hdmap.Signal]
    
    

    Version History

    Introduced in R2022b

    expand all