メインコンテンツ

SuperElevationSpan

Banking angle transition between adjacent superelevation nodes along road

Since R2026a

    Description

    The SuperElevationSpan object represents the banking angle transition between two adjacent superelevation nodes along a road. The span defines how the banking angle changes continuously between the node it begins at and the node it connects to.

    For each pair of adjacent SuperElevationNode objects, RoadRunner automatically creates a superelevation span. You cannot create or edit spans directly, but they update automatically when you insert nodes or modify node positions or angles. This image contains three nodes, where the two nodes at the ends exist by default and the intermediate node has been created using the insertNode object function. Inserting the intermediate node automatically split the existing span, creating new spans between each pair of adjacent nodes.

    RoadRunner scene canvas showing the superelevation curve, superelevation node, and superelevation span

    Creation

    To retrieve a SuperElevationSpan object from a road in your RoadRunner scene, extract the Spans property of the object stored in the SuperElevationCurve property of the road. The Spans property returns an ordered array of all superelevation spans defined along the road. For example, given a Road object, road, the expression seSpans = road.SuperElevationCurve.Spans extracts all superelevation spans, seSpans associated with the road.

    Properties

    expand all

    This property is read-only.

    Node at the start of the SuperElevationSpan, represented as an SuperElevationNode object. The StartNode defines the banking angle at the beginning of the span and marks the distance along the road where the banking transition starts.

    This property is read-only.

    Node at the end of the SuperElevationSpan, represented as a SuperElevationNode object. The EndNode defines the banking angle at the end of the span and marks the distance along the road where the banking transition ends.

    Examples

    collapse all

    Create a roadrunner object, specifying the path to an existing project. For example, this code shows the path to a project, on a Windows® machine, located at "C:\RR\MyProject". This code assumes that RoadRunner is installed in the default location, and returns an object, rrApp, that provides functions for performing basic tasks such as opening, closing, and saving scenes and projects.

    rrApp = roadrunner(ProjectFolder="C:\RR\MyProject");
    Create a new scene in RoadRunner by using the newScene function, specifying the roadrunner object rrApp.
    newScene(rrApp)
    

    Create a RoadRunner authoring API object, rrAPi, that references the object for the current RoadRunner instance rrApp. The rrApi object enables you to programmatically author scenes, such as by adding and modifying road and lane components, using MATLAB®.

    rrApi = roadrunnerAPI(rrApp);
    

    Extract the object for your scene from the Scene property of the authoring API object rrApi. The extracted Scene object enables you to specify the scene in which to add scene components, such as roads and lanes.

    scn = rrApi.Scene;

    Extract the object for your RoadRunner project from the Project property of the authoring API object rrApi. The extracted Project object enables you to specify the project folder for the current RoadRunner session from which to retrieve asset objects. You can use the asset objects to add lane markings to the lanes in your scene.

    prj = rrApi.Project;

    Use the addClothoidFitRoad function to add a new road. Specify the position of the road by specifying the positions of its start point startPt and end point endPt.

    startPt = [0 0 0];
    endPt = [50 0 0];
    rrRoad = addClothoidFitRoad(scn,[startPt; endPt]);

    Extract the reference lane from the ReferenceLane property of the road rrRoad. The extracted property ReferenceLane defines the center line of the road.

    refLane = rrRoad.ReferenceLane;

    Use the extracted refLane object to add lanes on either side of the reference lane of the road using the addLaneToLeft and addLaneToRight functions.

    leftLane = addLaneToLeft(refLane);
    rightLane = addLaneToRight(refLane);

    Use the getAsset function to retrieve the LaneMarkingStyle objects for a dashed solid yellow lane marking. These objects define the lane marking assets used to mark the spans in the lane marking profile of the reference lane.

    dashedWhiteMarkingStyle = prj.getAsset("<PROJECT>/Assets/Markings/DashedSingleWhite.rrlms","LaneMarkingStyle");
    solidWhiteMarkingStyle = prj.getAsset("<PROJECT>/Assets/Markings/SolidSingleWhite.rrlms","LaneMarkingStyle");

    Mark the boundaries of the lanes.

    leftLaneSpan = leftLane.LaneMarkingProfile.Spans(1);
    leftLaneSpan.LaneMarkingStyle = solidWhiteMarkingStyle;
    rightLaneSpan = rightLane.LaneMarkingProfile.Spans(1);
    rightLaneSpan.LaneMarkingStyle = solidWhiteMarkingStyle;
    referenceLaneSpan = refLane.LaneMarkingProfile.Spans(1);
    referenceLaneSpan.LaneMarkingStyle = dashedWhiteMarkingStyle;

    RoadRunner scene canvas showing the creation of road

    Access the superelevation definition of the road by extracting its SuperElevationCurve property.

    seCurve = rrRoad.SuperElevationCurve;

    Inspect the default superelevation nodes of the road. By default, the SuperElevationCurve contains two nodes: one at the start of the road and one at the end of the road.

    nodes = seCurve.Nodes

    Inspect Start and End Nodes of a Span

    Inspect the nodes connected by a specific superelevation span.

    span = seCurve.Spans(1);
    startNode = span.StartNode;
    endNode = span.EndNode;
    

    Apply Uniform Banking Along the Entire Road

    Set the same banking angle at the start and end nodes to apply uniform banking along the full road length.

    nodes(1).Angle = 10;
    nodes(end).Angle = 10;

    RoadRunner scene canvas showing the uniform banking along the entire road

    Define Non-Uniform Banking Using Start and End Nodes

    Assign different banking angles at the start and end of the road to create a continuous banking transition.

    nodes(1).Angle = 15;
    nodes(end).Angle = -15;

    RoadRunner scene canvas showing the non-uniform banking at the start and end of the road

    You can also use the addSuperElevation function to define different banking angles at the start and end of the road.

    addSuperElevation(rrRoad,0,15)   % 0 indicates the start position of the road
    addSuperElevation(rrRoad,50,-15) % 50 indicates the end position of the road

    Insert Intermediate SuperElevation Nodes

    Insert a new superelevation control point at a specified distance along the road.

    midNode = insertNode(seCurve,25);
    midNode.Angle = -10;

    Insert another superelevation node between the start node and your new midpoint node.

    addSuperElevation(rrRoad,12,-10);

    You can inspect updated spans using the expression spans = seCurve.Spans. After inserting the node, the original span is split into two spans:

    • One span connects the start node to the new node.

    • The other span connects the new node to the end node.

    RoadRunner scene canvas showing the new node inserted at the specified distance

    Modify Existing Superelevation Node

    Update the banking angle of an existing node without inserting a new one.

    midNode.Angle = 20;
    RoadRunner recalculates the banking profile of the road automatically.

    RoadRunner scene canvas showing the modification of an existing node

    Version History

    Introduced in R2026a