Main Content

roadrunner.hdmap.StaticObjectType

Create static object types in RoadRunner HD Map using MATLAB

Since R2022b

    Description

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

    Creation

    Description

    aStaticObjectType = roadrunner.hdmap.StaticObjectType() creates an empty StaticObject type.

    aStaticObjectType = roadrunner.hdmap.StaticObjectType(Name=Value) sets the properties of the StaticObject type using name-value pairs.

    example

    Properties

    expand all

    ID of the StaticObject type, specified as a character vector or string scalar. The StaticObject object refers to this field to describe the type of a static object.

    Data Types: char | string

    Relative path for 3D mesh or prop asset file, specified as a roadrunner.hdmap.RelativeAssetPath (RoadRunner) object. The asset path points to the information about the static object type.

    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]
         StaticObjectTypes: [0×1 roadrunner.hdmap.StaticObjectType]
             StaticObjects: [0×1 roadrunner.hdmap.StaticObject]
    
    

    Create a relative path to an asset. In this example, we create a relative path to a prop asset file from the RaodRunner Asset Library. This path is relative to the Assets folder of your RoadRunner project.

    path = roadrunner.hdmap.RelativeAssetPath(AssetPath="/Asset/Props/Trees/Eucalyptus_Sm01.fbx")
    path = 
      RelativeAssetPath with properties:
    
        AssetPath: "/Asset/Props/Trees/Eucalyptus_Sm01.fbx"
    
    

    Create the static object type using the roadrunner.hdmap.StaticObjectType object. Specify the static object type information for the static object type id and the asset path.

    rrMap.StaticObjectTypes = roadrunner.hdmap.StaticObjectType(ID="StaticObjectType1", 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: [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: [1×1 roadrunner.hdmap.StaticObjectType]
             StaticObjects: [0×1 roadrunner.hdmap.StaticObject]
    
    

    Version History

    Introduced in R2022b