Main Content

roadrunner.hdmap.AlignedReference

R2026b

Provided information for linking objects in RoadRunner HD Maps

Since R2022b

    Description

    The roadrunner.hdmap.AlignedReference object enables you to specify information for linking objects in RoadRunner HD Maps. This information is used to specify lane navigation. You can link a lane with lane boundaries and other lane. To specify the alignment between linked objects, you must follow these rules:

    • Alignment must always be relative to the orientation of the object of interest.

    • When the directions of two objects match, the alignment is forward. Otherwise, the alignment is backward.

    Creation

    Description

    alref = roadrunner.hdmap.AlignedReference() creates an empty aligned reference.

    alref = roadrunner.hdmap.AlignedReference(Name=Value) sets the properties of the aligned reference using name-value pairs.

    example

    Properties

    expand all

    ID of the referenced object, specified as a roadrunner.hdmap.Reference (RoadRunner) object.

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

    Type of alignment between linked objects, specified as a character vector or string scalar. The type of alignment is specified as one of the following strings: "Unspecified", "Forward", or "Backward".

    Example: alref= roadrunner.hdmap.AlignedReference(Reference=ref, Alignment="Forward") creates the aligned reference for Lane2 with "Forward" alignment.

    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: ""
               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 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
                    Metadata: [0×1 roadrunner.hdmap.Metadata]
        ParametricAttributes: [0×1 roadrunner.hdmap.ParametricAttribution]
    
    

    Create an aligned reference to Lane1 using the roadrunner.hdmap.AlignedReference object. For this example, specify the type of alignment as Forward.

    ref = roadrunner.hdmap.Reference(ID="Lane1")
    ref = 
      Reference with properties:
    
        ID: "Lane1"
    
    
    alref = roadrunner.hdmap.AlignedReference(Reference=ref,Alignment="Forward")
    alref = 
      AlignedReference with properties:
    
        Reference: [1×1 roadrunner.hdmap.Reference]
        Alignment: Forward
    
    

    Version History

    Introduced in R2022b