Add road to driving scenario
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
)
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.