Contenido principal

OverlapGroup

R2026b

Overlap group of road

Since R2026b

    Description

    An OverlapGroup object represents the overlap group a road belongs to. RoadRunner uses an overlap group to group roads that have overlapping road geometry but should not produce an automatic junction. Roads assigned to the same OverlapGroup do not automatically generate a junction where they overlap. Therefore, an overlap group allows you to control junction creation by preventing the automatic junction creation.

    Creation

    You can create an OverlapGroup object in your current RoadRunner scene in these ways:

    • To retrieve an OverlapGroup object from your RoadRunner scene, extract the OverlapGroup property of the Road object. For example, rrOverlapGroup = rrRoad.OverlapGroup extracts the OverlapGroup object from the OverlapGroup property of the road rrRoad.

    • You can use the addOverlapGroup function to add a new overlap group to your current RoadRunner scene.

    Properties

    expand all

    This property is read-only.

    Name of the overlap group, specified as a character vector or string scalar.

    For example, the roads in your existing RoadRunner scene belong to an overlap group named SceneBuild. If you do not want RoadRunner to create automatic junctions where those roads geometrically overlap with another set of roads, you must assign the new roads to the same overlap group by setting their Name property to SceneBuild. If the roads belong to different overlap groups, RoadRunner creates automatic junctions at their overlap locations.

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

    Note

    If you are opening RoadRunner from MATLAB® for the first time, or if you have changed the RoadRunner installation location since you last opened it from MATLAB, you can use the roadrunnerSetup function to specify new default project and installation folders to use when opening RoadRunner. You can save these folders between MATLAB sessions by selecting the Across MATLAB sessions option from the corresponding dropdown.

    Create a new RoadRunner scene in the current project 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;

    Create an overlap group using the addOverlapGroup function. Roads in the same group do not form automatic junctions with each other.

    overlapGroupName = "SceneBuild";
    overlapGroup = addOverlapGroup(scn,overlapGroupName)
    

    Version History

    Introduced in R2026b