Main Content

roadrunner.hdmap.RelativeAssetPath

Defines relative path for lane marking asset in RoadRunner HD Map using MATLAB

Since R2022b

    Description

    A roadrunner.hdmap.RelativeAssetPath object enables you to define the road lane marking object in a RoadRunner HD Map scene model. The RelativeAssetPath refers to the assets in the asset library by using the directory path relative to the project directory.

    Creation

    Description

    assetPath = roadrunner.hdmap.RelativeAssetPath() creates an empty relative asset path.

    assetPath = roadrunner.hdmap.RelativeAssetPath(Name=Value) sets the properties of the relative asset path using name-value pairs.

    example

    Properties

    expand all

    Relative path for an asset in the asset library, specified as a character vector or string scalar.

    Example: "Assets/Markings/DashedSingleWhite.rrlms" sets the path for the white dashed lane marking asset.

    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 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="/Asset/Markings/DashedSingleWhite.rrlms")
    path = 
      RelativeAssetPath with properties:
    
        AssetPath: "/Asset/Markings/DashedSingleWhite.rrlms"
    
    

    Create the road lane marking using the roadrunner.hdmap.LaneMarking object and add the asset as a lane marking.

    rrMap.LaneMarkings = roadrunner.hdmap.LaneMarking(ID="Dashed1", AssetPath=path)
    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: [1×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]
    
    

    Version History

    Introduced in R2022b