メインコンテンツ

SuperElevationNode

Road superelevation or banking angle at point

Since R2026a

    Description

    The SuperElevationNode object represents a control point that defines the road banking angle (superelevation) at a specified distance along a road.

    Each node specifies a banking angle, measured in degrees, at its location along the road reference line. RoadRunner uses these nodes as anchor points to compute a continuous banking profile along the road surface.

    By default, every road contains two superelevation nodes: one at the start of the road (distance = 0) and one at the end of the road (distance = total length of the road). These default nodes define the initial banking profile of the road. 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 SuperElevationNode object from a road in your RoadRunner scene, extract the Nodes property of the object stored in the SuperElevationCurve property of the road. The Nodes property returns an ordered array of all superelevation nodes defined along the road. For example, given a Road object, road, the expression seNodes = road.SuperElevationCurve.Nodes extracts all superelevation nodes,seNodes associated with the road.

    Properties

    expand all

    Distance of the superelevation node along the road, specified as a numeric scalar. Units are in meters. This distance is measured relative to the start of the road reference line, and must lie within the range [0, Length], where Length is the total length of the road.

    These nodes define the initial banking profile of the road and cannot be repositioned. You can insert additional intermediate nodes at custom distances to introduce localized banking changes.

    Data Types: double

    Banking angle at the node, specified as a numeric scalar in degrees. Valid values are in the range −60 to 60 degrees.

    This angle defines the lateral tilt of the road surface at the node location. RoadRunner interpolates banking smoothly between adjacent nodes using the spans connected to the node.

    Data Types: double

    Span connected at the start of the node, specified as a SuperElevationSpan object. This span defines the banking transition between the previous node and the current node.

    Span connected at the end of the node, specified as a SuperElevationSpan object. This span defines the banking transition between the current node and the next node.

    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

    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 an Intermediate Superelevation Node

    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);

    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