Drake
Lane Class Referenceabstract

Base class for the monolane implementation of api::Lane. More...

#include <drake/automotive/maliput/monolane/lane.h>

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

Public Member Functions

 Lane (const api::LaneId &id, const api::Segment *segment, const api::RBounds &lane_bounds, const api::RBounds &driveable_bounds, const api::HBounds &elevation_bounds, double p_scale, const CubicPolynomial &elevation, const CubicPolynomial &superelevation)
 Constructs a Lane. More...
 
const CubicPolynomialelevation () const
 
const CubicPolynomialsuperelevation () const
 
void SetStartBp (BranchPoint *bp)
 
void SetEndBp (BranchPoint *bp)
 
BranchPointstart_bp ()
 
BranchPointend_bp ()
 
 ~Lane () override=default
 
Does not allow copy, move, or assignment
 Lane (const Lane &)=delete
 
Laneoperator= (const Lane &)=delete
 
 Lane (Lane &&)=delete
 
Laneoperator= (Lane &&)=delete
 
- Public Member Functions inherited from Lane
const LaneId id () const
 Returns the persistent identifier. More...
 
const Segmentsegment () const
 Returns the Segment to which this Lane belongs. More...
 
int index () const
 Returns the index of this Lane within the Segment which owns it. More...
 
const Laneto_left () const
 Returns a pointer to the adjacent Lane to the left of this Lane. More...
 
const Laneto_right () const
 Returns a pointer to the adjacent Lane to the right of this Lane. More...
 
double length () const
 Returns the arc-length of the Lane along its reference curve. More...
 
RBounds lane_bounds (double s) const
 Returns the nominal lateral (r) bounds for the lane as a function of s. More...
 
RBounds driveable_bounds (double s) const
 Returns the driveable lateral (r) bounds of the lane as a function of s. More...
 
HBounds elevation_bounds (double s, double r) const
 Returns the elevation (h) bounds of the lane as a function of (s, r). More...
 
GeoPosition ToGeoPosition (const LanePosition &lane_pos) const
 Returns the GeoPosition corresponding to the given LanePosition. More...
 
LanePosition ToLanePosition (const GeoPosition &geo_position, GeoPosition *nearest_point, double *distance) const
 Determines the LanePosition corresponding to GeoPosition geo_position. More...
 
Rotation GetOrientation (const LanePosition &lane_pos) const
 Returns the rotation which expresses the orientation of the Lane-frame basis at lane_pos with respect to the world frame basis. More...
 
LanePosition EvalMotionDerivatives (const LanePosition &position, const IsoLaneVelocity &velocity) const
 Computes derivatives of LanePosition given a velocity vector velocity. More...
 
const BranchPointGetBranchPoint (const LaneEnd::Which which_end) const
 Returns the lane's BranchPoint for the end specified by which_end. More...
 
const LaneEndSetGetConfluentBranches (const LaneEnd::Which which_end) const
 Returns the set of LaneEnd's which connect with this lane on the same side of the BranchPoint at which_end. More...
 
const LaneEndSetGetOngoingBranches (const LaneEnd::Which which_end) const
 Returns the set of LaneEnd's which continue onward from this lane at the BranchPoint at which_end. More...
 
std::unique_ptr< LaneEndGetDefaultBranch (const LaneEnd::Which which_end) const
 Returns the default ongoing LaneEnd connected at which_end. More...
 
 Lane (const Lane &)=delete
 
Laneoperator= (const Lane &)=delete
 
 Lane (Lane &&)=delete
 
Laneoperator= (Lane &&)=delete
 

Additional Inherited Members

- Protected Member Functions inherited from Lane
 Lane ()=default
 

Detailed Description

Base class for the monolane implementation of api::Lane.

Constructor & Destructor Documentation

Lane ( const Lane )
delete
Lane ( Lane &&  )
delete
Lane ( const api::LaneId id,
const api::Segment segment,
const api::RBounds lane_bounds,
const api::RBounds driveable_bounds,
const api::HBounds elevation_bounds,
double  p_scale,
const CubicPolynomial elevation,
const CubicPolynomial superelevation 
)
inline

Constructs a Lane.

Parameters
idthe ID
segmentthe Segment to which this Lane will belong, which must remain valid for the lifetime of this class
lane_boundsnominal bounds of the lane, uniform along the entire reference path, which must be a subset of driveable_bounds
driveable_boundsdriveable bounds of the lane, uniform along the entire reference path
elevation_boundselevation bounds of the lane, uniform along the entire driveable surface
p_scaleisotropic scale factor for elevation and superelevation
elevationelevation function (see below)
superelevationsuperelevation function (see below)

This is the base class for subclasses, each of which describe a primitive reference curve in the xy ground-plane of the world frame. The specific curve is expressed by a subclass's implementations of private virtual functions; see the private method xy_of_p().

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).

N.B. The override Lane::ToLanePosition() is currently restricted to lanes in which superelevation and elevation change are both zero.

~Lane ( )
overridevirtualdefault

Reimplemented from Lane.

Member Function Documentation

const CubicPolynomial& elevation ( ) const
inline

Here is the caller graph for this function:

BranchPoint* end_bp ( )
inline

Here is the caller graph for this function:

Lane& operator= ( Lane &&  )
delete
Lane& operator= ( const Lane )
delete
void SetEndBp ( BranchPoint bp)
inline

Here is the caller graph for this function:

void SetStartBp ( BranchPoint bp)
inline

Here is the caller graph for this function:

BranchPoint* start_bp ( )
inline

Here is the caller graph for this function:

const CubicPolynomial& superelevation ( ) const
inline

Here is the caller graph for this function:


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