Main Content

roadrunner.hdmap.LaneMarking

Create lane markings in RoadRunner HD Map using MATLAB

Since R2022b

    Description

    A roadrunner.hdmap.LaneMarking object enables you to define the road lane marking object in a RoadRunner HD Map scene model.

    Creation

    Description

    aLaneMarking = roadrunner.hdmap.LaneMarking() creates an empty lane marking.

    example

    aLaneMarking = roadrunner.hdmap.LaneMarking(Name=Value) sets the properties of the lane marking using name-value pairs.

    Properties

    expand all

    ID of the lane marking element, specified as a character vector or string scalar. The ID can be referenced by the lane elements using roadrunner.hdmap.MarkingReference (RoadRunner) object.

    Data Types: char | string

    Relative path for lane marking asset, specified as a roadrunner.hdmap.RelativeAssetPath (RoadRunner) object. To define the lane markings on a span, RelativeAssetPath can be used to reference existing marking assets in the library.

    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: [0x1 roadrunner.hdmap.Lane]
            LaneBoundaries: [0x1 roadrunner.hdmap.LaneBoundary]
                LaneGroups: [0x1 roadrunner.hdmap.LaneGroup]
              LaneMarkings: [0x1 roadrunner.hdmap.LaneMarking]
                 Junctions: [0x1 roadrunner.hdmap.Junction]
              BarrierTypes: [0x1 roadrunner.hdmap.BarrierType]
                  Barriers: [0x1 roadrunner.hdmap.Barrier]
                 SignTypes: [0x1 roadrunner.hdmap.SignType]
                     Signs: [0x1 roadrunner.hdmap.Sign]
         StaticObjectTypes: [0x1 roadrunner.hdmap.StaticObjectType]
             StaticObjects: [0x1 roadrunner.hdmap.StaticObject]
    
    

    Create a relative path to an asset. In this example, we create a relative path to the dashed single white asset. This path is relative to the Assets folder of your RoadRunner project.

    path = roadrunner.hdmap.RelativeAssetPath(AssetPath="/Assets/Markings/DashedSingleWhite.rrlms")
    path = 
      RelativeAssetPath with properties:
    
        AssetPath: "/Assets/Markings/DashedSingleWhite.rrlms"
    
    

    Create the road lane marking using the roadrunner.hdmap.LaneMarking object. Specify the lane marking information for the lane marking id and the asset path.

    rrMap.LaneMarkings = roadrunner.hdmap.LaneMarking(ID="Dashed1", AssetPath=path)
    rrMap = 
      roadrunnerHDMap with properties:
    
                    Author: ""
              GeoReference: [0 0]
        GeographicBoundary: []
                     Lanes: [0x1 roadrunner.hdmap.Lane]
            LaneBoundaries: [0x1 roadrunner.hdmap.LaneBoundary]
                LaneGroups: [0x1 roadrunner.hdmap.LaneGroup]
              LaneMarkings: [1x1 roadrunner.hdmap.LaneMarking]
                 Junctions: [0x1 roadrunner.hdmap.Junction]
              BarrierTypes: [0x1 roadrunner.hdmap.BarrierType]
                  Barriers: [0x1 roadrunner.hdmap.Barrier]
                 SignTypes: [0x1 roadrunner.hdmap.SignType]
                     Signs: [0x1 roadrunner.hdmap.Sign]
         StaticObjectTypes: [0x1 roadrunner.hdmap.StaticObjectType]
             StaticObjects: [0x1 roadrunner.hdmap.StaticObject]
    
    

    Version History

    Introduced in R2022b