Drake

RoadCurve specification for a reference curve that describes a line. More...

#include <drake/automotive/maliput/multilane/line_road_curve.h>

Inheritance diagram for LineRoadCurve:
[legend]
Collaboration diagram for LineRoadCurve:
[legend]

## Public Member Functions

LineRoadCurve (const Vector2< double > &xy0, const Vector2< double > &dxy, const CubicPolynomial &elevation, const CubicPolynomial &superelevation)
Constructor. More...

Vector2< doublexy_of_p (double p) const override
Computes the reference curve. More...

Vector2< doublexy_dot_of_p (double p) const override
Computes the first derivative of the reference curve. More...

double heading_of_p (double p) const override
Computes the heading of the reference curve. More...

double heading_dot_of_p (double p) const override
Computes the first derivative heading of the reference curve. More...

double p_scale () const override
Computes the path length integral of the reference curve for the interval [0;1] of p. More...

Vector3< doubleToCurveFrame (const Vector3< double > &geo_coordinate, const api::RBounds &lateral_bounds, const api::HBounds &height_bounds) const override
Converts a geo_coordinate in the world frame to the composed curve frame, i.e., the superposition of the reference curve, elevation and superelevation polynomials. More...

bool IsValid (const api::RBounds &lateral_bounds, const api::HBounds &height_bounds) const override
As the reference curve is a line, the curvature radius is infinity at any point in the range of p = [0;1] so no value of elevation or superelevation may result in a geometry that intersects with itself. More...

Does not allow copy, move, or assignment

Public Member Functions inherited from RoadCurve

const CubicPolynomialelevation () const

const CubicPolynomialsuperelevation () const

double trajectory_length () const
Computes the composed curve path integral in the interval of p = [0; 1]. More...

## Additional Inherited Members

Protected Member Functions inherited from RoadCurve
RoadCurve (const CubicPolynomial &elevation, const CubicPolynomial &superelevation)
Constructs a road curve given elevation and superelevation curves. More...

## Detailed Description

RoadCurve specification for a reference curve that describes a line.

## Constructor & Destructor Documentation

delete
delete
 LineRoadCurve ( const Vector2< double > & xy0, const Vector2< double > & dxy, const CubicPolynomial & elevation, const CubicPolynomial & superelevation )
inlineexplicit

Constructor.

Computes a line from xy0 as the initial point of the line and dxy as the difference vector that connects the xy0 with the end point of the reference curve.

Parameters
 xy0 A 2D vector that represents the first point of the lane. dxy A 2D difference vector between the last point and xy0. elevation CubicPolynomial object that represents the elevation polynomial. See RoadCurve class constructor for more details. superelevation CubicPolynomial object that represents the superelevation polynomial. See RoadCurve class constructor for more details.
overridedefault

## Member Function Documentation

 double heading_dot_of_p ( double p ) const
inlineoverridevirtual

Computes the first derivative heading of the reference curve.

Parameters
 p The reference curve parameter.
Returns
The derivative of the heading with respect to p, i.e., d_heading/dp evaluated at p.

Here is the call graph for this function:

Here is the caller graph for this function:

 double heading_of_p ( double p ) const
inlineoverridevirtual

Computes the heading of the reference curve.

Parameters
 p The reference curve parameter.
Returns
The heading of the curve at p, i.e., the angle of the tangent vector (with respect to x-axis) in the increasing-p direction.

Here is the call graph for this function:

Here is the caller graph for this function:

 bool IsValid ( const api::RBounds & lateral_bounds, const api::HBounds & height_bounds ) const
inlineoverridevirtual

As the reference curve is a line, the curvature radius is infinity at any point in the range of p = [0;1] so no value of elevation or superelevation may result in a geometry that intersects with itself.

Parameters
 lateral_bounds An api::RBounds object that represents the lateral bounds of the surface mapping. height_bounds An api::HBounds object that represents the elevation bounds of the surface mapping.
Returns
True.

Here is the call graph for this function:

Here is the caller graph for this function:

 LineRoadCurve& operator= ( const LineRoadCurve & )
delete
delete
 double p_scale ( ) const
inlineoverridevirtual

Computes the path length integral of the reference curve for the interval [0;1] of p.

Returns
The path length integral of the reference curve.

Here is the call graph for this function:

Here is the caller graph for this function:

 Vector3< double > ToCurveFrame ( const Vector3< double > & geo_coordinate, const api::RBounds & lateral_bounds, const api::HBounds & height_bounds ) const
overridevirtual

Converts a geo_coordinate in the world frame to the composed curve frame, i.e., the superposition of the reference curve, elevation and superelevation polynomials.

The resulting coordinates are saturated to lateral_bounds and height_bounds in the lateral and vertical directions over the composed curve trajectory. The path length coordinate is saturated in the interval [0; trajectory_length()].

Parameters
 geo_coordinate A 3D vector in the world frame to be converted to the composed curve frame. lateral_bounds An api::RBounds object that represents the lateral bounds of the surface mapping. height_bounds An api::HBounds object that represents the elevation bounds of the surface mapping.
Returns
A 3D vector that represents the coordinates with respect to the composed curve. The first dimension represents the path length coordinate, the second dimension is the lateral deviation from the composed curve and the third one is the vertical deviation from the composed curve too. The frame where this vector is defined is the same as api::LanePosition.

Here is the call graph for this function:

Here is the caller graph for this function:

 Vector2 xy_dot_of_p ( double p ) const
inlineoverridevirtual

Computes the first derivative of the reference curve.

Parameters
 p The reference curve parameter.
Returns
The derivative of the curve with respect to p, at p, i.e., F'(p0) = (dx/dp, dy/dp) at p0.

Here is the call graph for this function:

Here is the caller graph for this function:

 Vector2 xy_of_p ( double p ) const
inlineoverridevirtual

Computes the reference curve.

Parameters
 p The reference curve parameter.
Returns
The reference curve itself, F(p).