Main Content

roadrunner.hdmap.SpeedLimit

Create lane speed limit in RoadRunner HD Map using MATLAB

Since R2024b

    Description

    A roadrunner.hdmap.SpeedLimit object enables you to define a speed limit for lanes in a RoadRunner HD Map scene model.

    Creation

    Description

    speedLimit = roadrunner.hdmap.SpeedLimit creates an empty speed limit element.

    speedLimit = roadrunner.hdmap.SpeedLimit(Name=Value) sets the properties of the speed limit element using one or more name-value arguments. For example, ID="SpeedLimits1" sets the ID of the lane speed limit element to "SpeedLimits1".

    example

    Properties

    expand all

    ID of the lane speed limit element, specified as a character vector or string scalar.

    Example: rrMap.SpeedLimits = roadrunner.hdmap.SpeedLimit(ID="SpeedLimits1") creates a lane speed limit element with ID "SpeedLimits1" in a RoadRunner HD Map.

    Data Types: char | string

    Lane speed limit value, specified as a positive integer in the range [0, 1000].

    Data Types: int32

    Unit of the lane speed limit value, specified as one of these values:

    • "Unspecified" — Unspecified unit

    • "Mph — Miles per hour

    • "Kph" — Kilometers per hour

    Examples

    collapse all

    Create an empty RoadRunner HD Map as a default roadrunnerHDMap object.

    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]
    
    

    Create a lane speed limit by using a roadrunner.hdmap.SpeedLimit object. Specify the speed limit ID.

    rrMap.SpeedLimits = roadrunner.hdmap.SpeedLimit(ID="SpeedLimit1")
    rrMap = 
      roadrunnerHDMap with properties:
    
                     Author: ""
               GeoReference: [0 0]
         GeographicBoundary: []
                      Lanes: [0x1 roadrunner.hdmap.Lane]
                SpeedLimits: [1x1 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 R2024b