Main Content

roadrunner.hdmap.BarrierType

Create barrier types in RoadRunner HD Map using MATLAB

Since R2022b

    Description

    A roadrunner.hdmap.BarrierType object enables you to define the barrier extrusion and the type information for a barrier in a RoadRunner HD Map scene model.

    Creation

    Description

    aBarrierType = roadrunner.hdmap.BarrierType() creates an empty barrier type.

    aBarrierType = roadrunner.hdmap.BarrierType(Name=Value) sets the properties of the barrier type using name-value pairs.

    example

    Properties

    expand all

    ID of the barrier type, specified as a character vector or string scalar. The Barrier object refers to this field to describe a barrier based on its extruded geometry.

    Data Types: char | string

    Relative path for extrusion asset that defines type of barrier, specified as a roadrunner.hdmap.RelativeAssetPath (RoadRunner) object. The asset path points to the extrusion information of this barrier type.

    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]
    
    

    Create an extrusion path to an asset. In this example, create a relative path to a constantS1opeBarrier asset file. This path is relative to the Assets folder of your RoadRunner project

    path = roadrunner.hdmap.RelativeAssetPath(AssetPath="/Assets/Extrusions/ConstantS1opeBarrier.rrext")
    path = 
      RelativeAssetPath with properties:
    
        AssetPath: "/Assets/Extrusions/ConstantS1opeBarrier.rrext"
    
    

    Create the barrier type using the roadrunner.hdmap.BarrierType object. Specify the barrier type information for the barrier type id and the extrusion path.

    rrMap.BarrierTypes = roadrunner.hdmap.BarrierType(ID="BarrierType1", ExtrusionPath=path)
    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: [1×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]
    
    

    Version History

    Introduced in R2022b