addPredecessor
R2026bSyntax
Description
adds a predecessor with ID aPredecessor = addPredecessor(aLane,predecessorID)predecessorID to the Predecessors (RoadRunner) property of the lane and returns it.
sets options using one or more name-value arguments.aPredecessor = addPredecessor(aLane,predecessorID,Name=Value)
Examples
Create an empty RoadRunner HD Map by calling the roadrunnerHDMap object.
rrMap = roadrunnerHDMap()
rrMap =
roadrunnerHDMap with properties:
Author: ""
GeoReference: [0 0]
GeographicBoundary: []
Lanes: [0×1 roadrunner.hdmap.Lane]
SpeedLimits: [0×1 roadrunner.hdmap.SpeedLimit]
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]
StaticObjectTypes: [0×1 roadrunner.hdmap.StaticObjectType]
StaticObjects: [0×1 roadrunner.hdmap.StaticObject]
StencilMarkingTypes: [0×1 roadrunner.hdmap.StencilMarkingType]
StencilMarkings: [0×1 roadrunner.hdmap.StencilMarking]
CurveMarkingTypes: [0×1 roadrunner.hdmap.CurveMarkingType]
CurveMarkings: [0×1 roadrunner.hdmap.CurveMarking]
SignalTypes: [0×1 roadrunner.hdmap.SignalType]
Signals: [0×1 roadrunner.hdmap.Signal]
Create two road lanes 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.Lanes(2) = roadrunner.hdmap.Lane(ID="Lane2",Geometry=[-0.782 -1.56;50.78 23.43],TravelDirection="Forward",LaneType="Driving")
rrMap =
roadrunnerHDMap with properties:
Author: ""
GeoReference: [0 0]
GeographicBoundary: []
Lanes: [2×1 roadrunner.hdmap.Lane]
SpeedLimits: [0×1 roadrunner.hdmap.SpeedLimit]
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]
StaticObjectTypes: [0×1 roadrunner.hdmap.StaticObjectType]
StaticObjects: [0×1 roadrunner.hdmap.StaticObject]
StencilMarkingTypes: [0×1 roadrunner.hdmap.StencilMarkingType]
StencilMarkings: [0×1 roadrunner.hdmap.StencilMarking]
CurveMarkingTypes: [0×1 roadrunner.hdmap.CurveMarkingType]
CurveMarkings: [0×1 roadrunner.hdmap.CurveMarking]
SignalTypes: [0×1 roadrunner.hdmap.SignalType]
Signals: [0×1 roadrunner.hdmap.Signal]
rrMap.Lanes(1) = roadrunner.hdmap.Lane(ID="Lane1",Geometry=[-0.534 -2.43;25.78 46.43],TravelDirection="Backward",LaneType="Driving")
rrMap =
roadrunnerHDMap with properties:
Author: ""
GeoReference: [0 0]
GeographicBoundary: []
Lanes: [2×1 roadrunner.hdmap.Lane]
SpeedLimits: [0×1 roadrunner.hdmap.SpeedLimit]
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]
StaticObjectTypes: [0×1 roadrunner.hdmap.StaticObjectType]
StaticObjects: [0×1 roadrunner.hdmap.StaticObject]
StencilMarkingTypes: [0×1 roadrunner.hdmap.StencilMarkingType]
StencilMarkings: [0×1 roadrunner.hdmap.StencilMarking]
CurveMarkingTypes: [0×1 roadrunner.hdmap.CurveMarkingType]
CurveMarkings: [0×1 roadrunner.hdmap.CurveMarking]
SignalTypes: [0×1 roadrunner.hdmap.SignalType]
Signals: [0×1 roadrunner.hdmap.Signal]
Add Lane1 as a predecessor to Lane2.
addPredecessor(rrMap.Lanes(2),"Lane1")ans =
AlignedReference with properties:
Reference: [1×1 roadrunner.hdmap.Reference]
Alignment: Unspecified
Input Arguments
Lane properties of a road, specified as a roadrunner.hdmap.Lane (RoadRunner) object.
Example: aLane=
roadrunner.hdmap.Lane(ID="Lane1",
Geometry=[-0.782 -1.56;50.78 23.43],
LaneType="Driving",
TravelDirection="Forward") creates a lane with
properties lane id, coordinates defining lane geometry, lane type, and driving
direction.
ID of the predecessor lane, specified as a string.
Example: addPredecessor(rrMap.Lanes(2),"Lane1")
assigns Lane1 as the predecessor of Lane2 in a
RoadRunner HD Map.
Data Types: char | string
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN, where Name is
the argument name and Value is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example:
Type of alignment between linked objects, specified as a character vector or
string scalar. The type of alignment is specified as one of the following strings:
"Unspecified", "Forward", or
"Backward".
Example: alref=
roadrunner.hdmap.AlignedReference(Reference=ref,
Alignment="Forward") creates the aligned
reference for Lane2 with "Forward"
alignment.
Data Types: char | string
Output Arguments
Linkage information for preceding lanes, specified as a roadrunner.hdmap.AlignedReference (RoadRunner) object.
Version History
Introduced in R2022b
See Also
roadrunnerHDMap (RoadRunner) | roadrunner.hdmap.Lane (RoadRunner) | roadrunner.hdmap.AlignedReference (RoadRunner) | addSuccessor (RoadRunner)
Topics
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)