Add road to driving scenario or road group
road(
adds a road to a driving scenario, scenario
,roadcenters
)scenario
. You specify
the road shape and the orientation of a road in the 2-D plane by using a set of
road centers, roadcenters
, at discrete points. When you
specify the number of lanes on a road, the lanes are numbered with respect to
the road centers. For more information, see Draw Direction of Road and Numbering of Lanes.
road(
adds a road with the specified width, scenario
,roadcenters
,roadwidth
)roadwidth
.
road(
adds a road with the specified width and banking angle,
scenario
,roadcenters
,roadwidth
,bankingangle
)bankingangle
.
road(
adds a road with the specified lanes, scenario
,roadcenters
,'Lanes',lspec
)lspec
.
road(
adds a road with the specified banking angle and lanes.scenario
,roadcenters
,bankingangle
,'Lanes',lspec
)
road(___,'Name',
specifies the name of the road, using any of the input argument combinations
from previous syntaxes.name
)
returns a
rd
= road(___)Road
object that stores the properties of the created
road.
road(
adds a road segment to a road group, rg
,roadcenters
)rg
. Use a road group
to create a road junction or intersection. You specify the shape and the
orientation of the road segment in the 2-D plane by using a set of road centers,
roadcenters
, at discrete points. When you specify the
number of lanes on a road segment, the lanes are numbered with respect to the
road centers. For more information, see Draw Direction of Road and Numbering of Lanes.
road(
adds a road segment with the specified width, rg
,roadcenters
,roadwidth
)roadwidth
, to
the road group.
road(
adds a road segment with the specified width and banking angle,
rg
,roadcenters
,roadwidth
,bankingangle
)bankingangle
, to the road group.
road(
adds a road segment with the specified lanes, rg
,roadcenters
,'Lanes',lspec
)lspec
, to the
road group.
road(
adds a road segment with the specified banking angle and lanes to the road
group.rg
,roadcenters
,bankingangle
,'Lanes',lspec
)
The road
function creates a road for an actor to follow in a
driving scenario. You specify the road using N two-dimensional or
three-dimensional waypoints. Each of the N – 1 segments between
waypoints defines a curve whose curvature varies linearly with distance along the
segment. The function fits a piecewise clothoid curve to the
(x, y) coordinates of the waypoints by
matching the curvature on both sides of the waypoint. For a nonclosed curve, the
curvature at the first and last waypoint is zero. If the first and last waypoints
coincide, then the curvatures before and after the endpoints are matched. The
z-coordinates of the road are interpolated using a
shape-preserving piecewise cubic curve.