Drake
RoadCurve Class Referenceabstract

Defines an interface for a path in a Segment object surface. More...

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

Inheritance diagram for RoadCurve:
[legend]

Public Member Functions

virtual ~RoadCurve ()=default
 
const CubicPolynomialelevation () const
 
const CubicPolynomialsuperelevation () const
 
double trajectory_length () const
 Computes the composed curve path integral in the interval of p = [0; 1]. More...
 
virtual Vector2< doublexy_of_p (double p) const =0
 Computes the reference curve. More...
 
virtual Vector2< doublexy_dot_of_p (double p) const =0
 Computes the first derivative of the reference curve. More...
 
virtual double heading_of_p (double p) const =0
 Computes the heading of the reference curve. More...
 
virtual double heading_dot_of_p (double p) const =0
 Computes the first derivative heading of the reference curve. More...
 
virtual double p_scale () const =0
 Computes the path length integral of the reference curve for the interval [0;1] of p. More...
 
virtual Vector3< doubleToCurveFrame (const Vector3< double > &geo_coordinate, const api::RBounds &lateral_bounds, const api::HBounds &height_bounds) const =0
 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...
 
virtual bool IsValid (const api::RBounds &lateral_bounds, const api::HBounds &height_bounds) const =0
 Checks that there are no self-intersections (singularities) in the volume created by applying the constant lateral_bounds and height_bounds to the RoadCurve. More...
 
Does not allow copy, move, or assignment
 RoadCurve (const RoadCurve &)=delete
 
RoadCurveoperator= (const RoadCurve &)=delete
 
 RoadCurve (RoadCurve &&)=delete
 
RoadCurveoperator= (RoadCurve &&)=delete
 

Protected Member Functions

 RoadCurve (const CubicPolynomial &elevation, const CubicPolynomial &superelevation)
 Constructs a road curve given elevation and superelevation curves. More...
 

Detailed Description

Defines an interface for a path in a Segment object surface.

The path is defined by an elevation and superelevation CubicPolynomial objects and a reference curve. This reference curve is a C1 function over the z=0 plane. Its domain is constrained in [0;1] interval and it should map a ℝ² curve. As per notation, p is the parameter of the reference curve, and function interpolations and function derivatives as well as headings and heading derivatives are expressed in world coordinates, which is the same frame as api::GeoPosition. By implementing this interface the road curve is defined and a complete.

Constructor & Destructor Documentation

RoadCurve ( const RoadCurve )
delete
RoadCurve ( RoadCurve &&  )
delete
virtual ~RoadCurve ( )
virtualdefault
RoadCurve ( const CubicPolynomial elevation,
const CubicPolynomial superelevation 
)
inlineprotected

Constructs a road curve given elevation and superelevation curves.

Parameters
elevationCubicPolynomial object that represents the elevation function (see below for more details).
superelevationCubicPolynomial object that represents the superelevation function (see below for more details).

elevation and superelevation are cubic-polynomial functions which define the elevation and superelevation as a function of position along the planar reference curve. elevation specifies the z-component of the surface at (r,h) = (0,0). superelevation specifies the angle of the r-axis with respect to the horizon, i.e., how the road twists. Thus, non-zero superelevation contributes to the z-component at r != 0.

These two functions (elevation and superelevation) must be isotropically scaled to operate over the domain p in [0, 1], where p is linear in the path-length of the planar reference curve, p = 0 corresponds to the start and p = 1 to the end. p_scale() is the scale factor. In other words...

Given:

  • a reference curve R(p) parameterized by p in domain [0, 1], which has a path-length q(p) in range [0, q_max], linearly related to p, where q_max is the total path-length of R (in real-world units);
  • the true elevation function E_true(q), parameterized by the path-length q of R;
  • the true superelevation function S_true(q), parameterized by the path-length q of R;

then:

  • p_scale is q_max (and p = q / p_scale);
  • elevation is E_scaled = (1 / p_scale) * E_true(p_scale * p);
  • superelevation is S_scaled = (1 / p_scale) * S_true(p_scale * p).

Member Function Documentation

const CubicPolynomial& elevation ( ) const
inline

Here is the caller graph for this function:

virtual double heading_dot_of_p ( double  p) const
pure virtual

Computes the first derivative heading of the reference curve.

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

Implemented in ArcRoadCurve, and LineRoadCurve.

Here is the caller graph for this function:

virtual double heading_of_p ( double  p) const
pure virtual

Computes the heading of the reference curve.

Parameters
pThe 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.

Implemented in ArcRoadCurve, and LineRoadCurve.

Here is the caller graph for this function:

virtual bool IsValid ( const api::RBounds lateral_bounds,
const api::HBounds height_bounds 
) const
pure virtual

Checks that there are no self-intersections (singularities) in the volume created by applying the constant lateral_bounds and height_bounds to the RoadCurve.

Parameters
lateral_boundsAn api::RBounds object that represents the lateral bounds of the surface mapping.
height_boundsAn api::HBounds object that represents the elevation bounds of the surface mapping.
Returns
True when there are no self-intersections.

Implemented in ArcRoadCurve, and LineRoadCurve.

Here is the caller graph for this function:

RoadCurve& operator= ( RoadCurve &&  )
delete
RoadCurve& operator= ( const RoadCurve )
delete
virtual double p_scale ( ) const
pure virtual

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.

Implemented in ArcRoadCurve, and LineRoadCurve.

Here is the caller graph for this function:

const CubicPolynomial& superelevation ( ) const
inline

Here is the caller graph for this function:

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

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_coordinateA 3D vector in the world frame to be converted to the composed curve frame.
lateral_boundsAn api::RBounds object that represents the lateral bounds of the surface mapping.
height_boundsAn 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.

Implemented in ArcRoadCurve, and LineRoadCurve.

Here is the caller graph for this function:

double trajectory_length ( ) const
inline

Computes the composed curve path integral in the interval of p = [0; 1].

Returns
The path length integral of the curve composed with the elevation polynomial.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual Vector2<double> xy_dot_of_p ( double  p) const
pure virtual

Computes the first derivative of the reference curve.

Parameters
pThe 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.

Implemented in ArcRoadCurve, and LineRoadCurve.

Here is the caller graph for this function:

virtual Vector2<double> xy_of_p ( double  p) const
pure virtual

Computes the reference curve.

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

Implemented in ArcRoadCurve, and LineRoadCurve.

Here is the caller graph for this function:


The documentation for this class was generated from the following file: