Main Content

roadrunner.hdmap.Lane

Create lanes in RoadRunner HD Map using MATLAB

    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.

    example

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

    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. The type of lane is specified as one of the following strings: "Unspecified", "Driving", "Shoulder", "Border", "Restricted", "Parking", "Curb", "Sidewalk", "CenterTurn" or "Biking".

    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

    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