Drake

Defines an interface for a path in a Segment object surface. More...
#include <drake/automotive/maliput/multilane/road_curve.h>
Public Member Functions  
virtual  ~RoadCurve ()=default 
const CubicPolynomial &  elevation () const 
const CubicPolynomial &  superelevation () const 
double  trajectory_length () const 
Computes the composed curve path integral in the interval of p = [0; 1]. More...  
virtual Vector2< double >  xy_of_p (double p) const =0 
Computes the reference curve. More...  
virtual Vector2< double >  xy_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< double >  ToCurveFrame (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 selfintersections (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  
RoadCurve &  operator= (const RoadCurve &)=delete 
RoadCurve (RoadCurve &&)=delete  
RoadCurve &  operator= (RoadCurve &&)=delete 
Protected Member Functions  
RoadCurve (const CubicPolynomial &elevation, const CubicPolynomial &superelevation)  
Constructs a road curve given elevation and superelevation curves. More...  
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.

virtualdefault 

inlineprotected 
Constructs a road curve given elevation and superelevation curves.
elevation  CubicPolynomial object that represents the elevation function (see below for more details). 
superelevation  CubicPolynomial object that represents the superelevation function (see below for more details). 
elevation
and superelevation
are cubicpolynomial functions which define the elevation and superelevation as a function of position along the planar reference curve. elevation
specifies the zcomponent of the surface at (r,h) = (0,0). superelevation
specifies the angle of the raxis with respect to the horizon, i.e., how the road twists. Thus, nonzero superelevation
contributes to the zcomponent 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 pathlength 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:
then:
elevation
is E_scaled = (1 / p_scale) * E_true(p_scale * p);superelevation
is S_scaled = (1 / p_scale) * S_true(p_scale * p).

inline 
Computes the first derivative heading of the reference curve.
p  The reference curve parameter. 
p
. Implemented in ArcRoadCurve, and LineRoadCurve.
Computes the heading of the reference curve.
p  The reference curve parameter. 
p
, i.e., the angle of the tangent vector (with respect to xaxis) in the increasingp direction. Implemented in ArcRoadCurve, and LineRoadCurve.

pure virtual 
Checks that there are no selfintersections (singularities) in the volume created by applying the constant lateral_bounds
and height_bounds
to the RoadCurve.
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. 
Implemented in ArcRoadCurve, and LineRoadCurve.

pure virtual 
Computes the path length integral of the reference curve for the interval [0;1] of p.
Implemented in ArcRoadCurve, and LineRoadCurve.

inline 

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()].
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. 
Implemented in ArcRoadCurve, and LineRoadCurve.

inline 
Computes the composed curve path integral in the interval of p = [0; 1].
Computes the first derivative of the reference curve.
p  The reference curve parameter. 
p
, i.e., F'(p0) = (dx/dp, dy/dp) at p0. Implemented in ArcRoadCurve, and LineRoadCurve.
Computes the reference curve.
p  The reference curve parameter. 
Implemented in ArcRoadCurve, and LineRoadCurve.