template<typename T>
class drake::automotive::Curve2< T >
Curve2 represents a path through two-dimensional Cartesian space.
Given a list of waypoints, it traces a path between them.
Instantiated templates for the following kinds of T's are provided:
They are already available to link against in the containing library.
- Note
- We will soon trace the path using a spline, but for now it's easiest to just interpolate straight segments, as a starting point. Callers should not yet rely on how we are traversing between the waypoints.
Returns the Curve's PositionResult::position
at path_distance
, as well as its first derivative PositionResult::position_dot
with respect to path_distance
.
The path_distance
is clipped to the ends of the curve:
- A negative
path_distance
is interpreted as a path_distance
of zero.
- A
path_distance
that exceeds the path_length()
of the curve is interpreted as a path_distance
equal to the path_length()
.
The position_dot
derivative, when evaluated exactly at a waypoint, will be congruent with the direction of one of the (max two) segments that neighbor the waypoint. (At the first and last waypoints, there is only one neighboring segment.)