Main Content

roadrunner.hdmap.Metadata

Add user-defined metadata to elements of RoadRunner HD Map using MATLAB

Since R2023b

    Description

    A roadrunner.hdmap.Metadata object enables you to describe elements in a RoadRunner HD Map scene model by adding user-defined ancillary data. You can specify the name of a user-defined parameter and set its value.

    Creation

    Description

    metadata = roadrunner.hdmap.Metadata creates an empty metadata object.

    metadata = roadrunner.hdmap.Metadata(Name=Value) sets properties using one or more name-value arguments.

    example

    Properties

    expand all

    Name of a user-defined parameter, specified as a character vector or string scalar.

    Data Types: char | string

    Value of a user-defined parameter, specified as a character vector or string scalar.

    Data Types: char | string

    Examples

    collapse all

    Create an empty RoadRunner HD Map by using the roadrunnerHDMap object. Notice that the map does not have any lanes.

    rrMap = roadrunnerHDMap
    rrMap = 
      roadrunnerHDMap with properties:
    
                     Author: ""
               GeoReference: [0 0]
         GeographicBoundary: []
                      Lanes: [0x1 roadrunner.hdmap.Lane]
                SpeedLimits: [0x1 roadrunner.hdmap.SpeedLimit]
             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]
        StencilMarkingTypes: [0x1 roadrunner.hdmap.StencilMarkingType]
            StencilMarkings: [0x1 roadrunner.hdmap.StencilMarking]
          CurveMarkingTypes: [0x1 roadrunner.hdmap.CurveMarkingType]
              CurveMarkings: [0x1 roadrunner.hdmap.CurveMarking]
    
    

    Define metadata for a lane using the roadrunner.hdmap.Metadata object.

    metadata = roadrunner.hdmap.Metadata(Name="Name",Value="Left Shoulder Lane");

    Create a lane using the roadrunner.hdmap.Lane object. Specify the lane ID, lane geometry, travel direction, lane type, and metadata attributes for the lane.

    rLane = roadrunner.hdmap.Lane(ID="Lane1", ...
        Geometry=[-0.782 -1.56;50.78 23.43], ...
        TravelDirection="Forward", ...
        LaneType="Driving", ...
        Metadata=metadata);

    Add the lane to the RoadRunner HD Map.

    rrMap.Lanes = rLane
    rrMap = 
      roadrunnerHDMap with properties:
    
                     Author: ""
               GeoReference: [0 0]
         GeographicBoundary: []
                      Lanes: [1x1 roadrunner.hdmap.Lane]
                SpeedLimits: [0x1 roadrunner.hdmap.SpeedLimit]
             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]
        StencilMarkingTypes: [0x1 roadrunner.hdmap.StencilMarkingType]
            StencilMarkings: [0x1 roadrunner.hdmap.StencilMarking]
          CurveMarkingTypes: [0x1 roadrunner.hdmap.CurveMarkingType]
              CurveMarkings: [0x1 roadrunner.hdmap.CurveMarking]
    
    

    Version History

    Introduced in R2023b