Main Content

roadrunner.hdmap.Reference

Defines id of referenced object in RoadRunner HD map using MATLAB

Since R2022b

    Description

    The roadrunner.hdmap.Reference object holds the id to the object being referred to in RoadRunner HD Maps. For example, a Junction A can refer to Lane B by holding Lane B's id in its reference.

    Creation

    Description

    ref = roadrunner.hdmap.Reference() creates an empty reference.

    ref = roadrunner.hdmap.Reference(Name=Value) sets the properties of the reference using name-value pairs.

    example

    Properties

    expand all

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

    Example: ref= roadrunner.hdmap.Reference(ID="Lane2") creates a referenced object with id Lane2.

    Data Types: char | string

    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 using the roadrunner.hdmap.Lane object. Specify the lane information for the lane id, coordinates defining the lane geometry, driving direction, and lane type.

    rLane = roadrunner.hdmap.Lane(ID="Lane1",Geometry=[-0.782 -1.56;50.78 23.43],TravelDirection="Forward",LaneType="Driving")
    rLane = 
      Lane with properties:
    
                       ID: "Lane1"
                 Geometry: [2×2 double]
          TravelDirection: Forward
         LeftLaneBoundary: [0×0 roadrunner.hdmap.AlignedReference]
        RightLaneBoundary: [0×0 roadrunner.hdmap.AlignedReference]
             Predecessors: [0×1 roadrunner.hdmap.AlignedReference]
               Successors: [0×1 roadrunner.hdmap.AlignedReference]
                 LaneType: Driving
    
    

    Create a reference to Lane1 using the roadrunner.hdmap.Reference object.

    ref = roadrunner.hdmap.Reference(ID="Lane1")
    ref = 
      Reference with properties:
    
        ID: "Lane1"
    
    

    Version History

    Introduced in R2022b