Main Content

roadrunner.hdmap.Junction

R2026b

Define junction in RoadRunner HD Map

Since R2022b

    Description

    A roadrunner.hdmap.Junction object enables you to define a junction in a RoadRunner HD Map scene model. A Junction represents 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. To learn how to create a complete T-junction with roads, maneuver lanes, and traffic signal phases that include bulb-level signal control, see Build Signalized Junction Using RoadRunner HD Map.

    Creation

    Description

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

    junction = roadrunner.hdmap.Junction(PropertyName=Value) specifies one or more properties of the junction using 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 roadrunner.hdmap.MultiPolygon object. The geometry of the junction object is represented by a set of non-overlapping polygons. Each polygon consists of an outer boundary and can optionally contain one or more interior regions (holes). While polygons cannot overlap, you can define a polygon within a hole in another polygon. When a junction requires multiple polygons, you must group the polygons inside a single roadrunner.hdmap.MultiPolygon object.

    IDs of connecting lanes, specified as an array of roadrunner.hdmap.Reference objects. These lanes can connect topologically to other lanes enclosed in the junction. For example, a small roundabout (mini-circle) might consist 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.

    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 a road lane marking using a roadrunner.hdmap.Junction object. Specify 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]
    
    

    Limitations

    Version History

    Introduced in R2022b

    expand all