Main Content

roadrunner.hdmap.Lane

Create lanes in RoadRunner HD Map using MATLAB

Since R2022b

    Description

    A roadrunner.hdmap.Lane object enables you to define the structure for representing lanes in a RoadRunner HD Map scene model. You can create an empty lane in a RoadRunner HD Map and assign properties to the lane to describe its geometry, travel direction, lane boundaries, and lane type.

    Creation

    Description

    aLane = roadrunner.hdmap.Lane() creates an empty lane.

    aLane = roadrunner.hdmap.Lane(Name=Value) sets the properties of the lane using name-value pairs.

    example

    Properties

    expand all

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

    Example: rrMap.Lanes= roadrunner.hdmap.Lane(ID="Lane1") creates a lane with id Lane1 in a RoadRunner HD Map.

    Data Types: char | string

    3D coordinates of points representing the center line of the lane, specified as a three element vector, with double precision values.

    Example: rrMap.Lanes(1)= roadrunner.hdmap.Lane(ID="Lane1", Geometry=[-0.782 -1.56;50.78 23.43]) creates a lane with id "Lane1" and defines the coordinates for the lane geometry.

    Data Types: double

    Direction of travel along the lane, specified as a character vector or string scalar. The direction of travel along the lane is specified as one of the following strings: "Unspecified", "Undirected", "Forward", "Backward", or "Bidirectional".

    Example: rrMap.Lanes(1)= roadrunner.hdmap.Lane(ID="Lane1", Geometry=[-0.782 -1.56;50.78 23.43], TravelDirection="Forward") creates a lane with a lane id, coordinates defining lane geometry, and driving direction.

    Data Types: char | string

    Linkage information for the left boundary of the lane, specified as a roadrunner.hdmap.AlignedReference (RoadRunner) object.

    Linkage information for the right boundary of the lane, specified as a roadrunner.hdmap.AlignedReference (RoadRunner) object.

    Linkage information for preceding lanes, specified as a roadrunner.hdmap.AlignedReference (RoadRunner) object.

    Linkage information for succeeding lanes, specified as a roadrunner.hdmap.AlignedReference (RoadRunner) object.

    Type of lane, specified as a character vector or string scalar. Specify the type of lane as one of these strings:

    • "Unspecified" — Unspecified type of lane

    • "Driving" — Normal driving lanes

    • "Shoulder" — Lanes reserved for emergency stopping

    • "Border" — Lanes at the road borders

    • "Restricted" — Lanes reserved for high occupancy vehicles

    • "Parking" — Lanes alongside driving lanes, intended for parking vehicles

    • "Curb" — Curb at the edge of the road

    • "Sidewalk" — Lanes reserved for pedestrians

    • "CenterTurn" — Lanes in the middle of a two-way street, intended for making a turn

    • "Biking" — Lanes reserved for cyclists

    • "Entry" — Acceleration lane parallel to driving lanes

    • "Exit" — Deceleration lane parallel to driving lanes

    • "OffRamp" — Ramp to exit a highway and go to a local road

    • "OnRamp" — Ramp to enter a highway from a local road

    • "Stop" — Lane for emergency stop on a highway

    • "Median" — Nondriving lane between two driving lanes with opposite travel directions

    • "None" — Nondriving lane, used to specify space on the outermost edge of the road

    Example: rrMap.Lanes(1)= roadrunner.hdmap.Lane(ID="Lane1", Geometry=[-0.782 -1.56;50.78 23.43], LaneType="Driving", TravelDirection="Forward") creates a lane with a lane id, coordinates defining lane geometry, lane type, and driving direction.

    Data Types: char | string

    User-defined ancillary data, specified as a roadrunner.hdmap.Metadata object or a vector of roadrunner.hdmap.Metadata objects. Use a vector of roadrunner.hdmap.Metadata objects to assign multiple user-defined parameters to a lane.

    Span-based parametric attributes to specify speed limits for a lane, specified as an array of roadrunner.hdmap.ParametricAttribution objects.

    Object Functions

    addPredecessor (RoadRunner)Add predecessor to lane in RoadRunner HD Map using MATLAB
    addSuccessor (RoadRunner)Add successor to lane in RoadRunner HD Map using MATLAB
    leftBoundary (RoadRunner)Set left boundary of lane in RoadRunner HD Map using MATLAB
    rightBoundary (RoadRunner)Set right boundary of lane in RoadRunner HD Map using MATLAB

    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 the road lane using the roadrunner.hdmap.Lane object. Specify the lane information for the lane id, coordinates defining the lane geometry, driving direction, and lane type.

    rrmap.Lane = roadrunner.hdmap.Lane(ID="Lane",Geometry=[-0.782 -1.56;50.78 23.43],TravelDirection="Forward",LaneType="Driving")
    rrmap = struct with fields:
        Lane: [1×1 roadrunner.hdmap.Lane]
    
    

    Version History

    Introduced in R2022b

    expand all