Drake

A Lane represents a lane of travel in a road network. More...
#include <drake/automotive/maliput/api/lane.h>
Public Member Functions  
virtual  ~Lane ()=default 
const LaneId  id () const 
Returns the persistent identifier. More...  
const Segment *  segment () 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 Lane *  to_left () const 
Returns a pointer to the adjacent Lane to the left of this Lane. More...  
const Lane *  to_right () const 
Returns a pointer to the adjacent Lane to the right of this Lane. More...  
double  length () const 
Returns the arclength 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...  
template<typename T >  
GeoPositionT< T >  ToGeoPositionT (const LanePositionT< T > &lane_pos) const 
Generalization of ToGeoPosition to arbitrary scalar types, where the structures LanePositionT<T> and GeoPositionT<T> are used in place of LanePosition and GeoPosition , respectively. More...  
LanePosition  ToLanePosition (const GeoPosition &geo_pos, GeoPosition *nearest_point, double *distance) const 
Determines the LanePosition corresponding to GeoPosition geo_pos . More...  
template<typename T >  
LanePositionT< T >  ToLanePositionT (const GeoPositionT< T > &geo_pos, GeoPositionT< T > *nearest_point, T *distance) const 
Generalization of ToLanePosition to arbitrary scalar types, where the structures LanePositionT<T> and GeoPositionT<T> are used in place of LanePosition and GeoPosition , respectively. 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 BranchPoint *  GetBranchPoint (const LaneEnd::Which which_end) const 
Returns the lane's BranchPoint for the end specified by which_end . More...  
const LaneEndSet *  GetConfluentBranches (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 LaneEndSet *  GetOngoingBranches (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...  
optional< LaneEnd >  GetDefaultBranch (const LaneEnd::Which which_end) const 
Returns the default ongoing LaneEnd connected at which_end , or nullopt if no default branch has been established at which_end . More...  
template<>  
GeoPositionT< double >  ToGeoPositionT (const LanePositionT< double > &lane_pos) const 
template<>  
GeoPositionT< AutoDiffXd >  ToGeoPositionT (const LanePositionT< AutoDiffXd > &lane_pos) const 
template<>  
LanePositionT< double >  ToLanePositionT (const GeoPositionT< double > &geo_pos, GeoPositionT< double > *nearest_point, double *distance) const 
template<>  
LanePositionT< AutoDiffXd >  ToLanePositionT (const GeoPositionT< AutoDiffXd > &geo_pos, GeoPositionT< AutoDiffXd > *nearest_point, AutoDiffXd *distance) const 
Does not allow copy, move, or assignment  
Lane (const Lane &)=delete  
Lane &  operator= (const Lane &)=delete 
Lane (Lane &&)=delete  
Lane &  operator= (Lane &&)=delete 
Protected Member Functions  
Lane ()=default  
A Lane represents a lane of travel in a road network.
A Lane defines a curvilinear coordinate system covering the road surface, with a longitudinal 's' coordinate that expresses the arclength along a central reference curve. The reference curve nominally represents an ideal travel trajectory along the Lane.
Lanes are grouped by Segment. All Lanes belonging to a Segment represent the same road surface, but with different coordinate parameterizations (e.g., each Lane has its own reference curve).

protecteddefault 
Returns the driveable lateral (r) bounds of the lane as a function of s.
These are the lateral bounds for a position that is considered to be "on pavement", reflecting the physical extent of the paved surface of the lane's segment.
Returns the elevation (h
) bounds of the lane as a function of (s, r)
.
These are the elevation bounds for a position that is considered to be within the volume modelled by the RoadGeometry.

inline 

inline 
Returns the lane's BranchPoint for the end specified by which_end
.

inline 
Returns the set of LaneEnd's which connect with this lane on the same side of the BranchPoint at which_end
.
At a minimum, this set will include this Lane.

inline 
Returns the default ongoing LaneEnd connected at which_end
, or nullopt if no default branch has been established at which_end
.

inline 
Returns the set of LaneEnd's which continue onward from this lane at the BranchPoint at which_end
.

inline 
Returns the rotation which expresses the orientation of the Lane
frame basis at lane_pos
with respect to the world frame basis.

inline 
Returns the persistent identifier.
Returns the nominal lateral (r) bounds for the lane as a function of s.
These are the lateral bounds for a position that is considered to be "staying in the lane".

inline 

inline 

inline 

inline 
Returns the GeoPosition corresponding to the given LanePosition.
lane_pos
must be in domain [0, Lane::length()]. lane_pos
must be in domain [Rmin, Rmax] derived from Lane::driveable_bounds(). GeoPositionT<double> ToGeoPositionT  (  const LanePositionT< double > &  lane_pos  )  const 
GeoPositionT<AutoDiffXd> ToGeoPositionT  (  const LanePositionT< AutoDiffXd > &  lane_pos  )  const 
GeoPositionT<T> ToGeoPositionT  (  const LanePositionT< T > &  lane_pos  )  const 
Generalization of ToGeoPosition to arbitrary scalar types, where the structures LanePositionT<T>
and GeoPositionT<T>
are used in place of LanePosition
and GeoPosition
, respectively.
When the arguments are of type AutoDiffXd, the return value is a GeoPositionT<AutoDiffXd> containing the same partial derivatives as those appearing in lane_pos. The provided lane_pos must be internally consistent; the s, r, and h variables must have derivatives of equal size, and where the ith derivative of one variable is taken with respect to the same quantity as the ith derviative of another variable.
Instantiated templates for the following kinds of T's are provided:
They are already available to link against in the containing library.

inline 
Determines the LanePosition corresponding to GeoPosition geo_pos
.
The return value is the LanePosition of the point within the Lane's driveablebounds which is closest to geo_pos
(as measured by the Cartesian metric in the world frame). If nearest_point
is nonnull, then it will be populated with the GeoPosition of that nearest point. If distance
is nonnull, then it will be populated with the Cartesian distance from geo_pos
to that nearest point.
This method guarantees that its result satisfies the condition that ToGeoPosition(result)
is within linear_tolerance()
of *nearest_position
.
LanePositionT<AutoDiffXd> ToLanePositionT  (  const GeoPositionT< AutoDiffXd > &  geo_pos, 
GeoPositionT< AutoDiffXd > *  nearest_point,  
AutoDiffXd *  distance  
)  const 
LanePositionT<double> ToLanePositionT  (  const GeoPositionT< double > &  geo_pos, 
GeoPositionT< double > *  nearest_point,  
double *  distance  
)  const 
LanePositionT<T> ToLanePositionT  (  const GeoPositionT< T > &  geo_pos, 
GeoPositionT< T > *  nearest_point,  
T *  distance  
)  const 
Generalization of ToLanePosition to arbitrary scalar types, where the structures LanePositionT<T>
and GeoPositionT<T>
are used in place of LanePosition
and GeoPosition
, respectively.
When the arguments are of type AutoDiffXd, the return value is a LanePositionT<AutoDiffXd> containing the same partial derivatives as those appearing in geo_pos. The provided geo_pos must be internally consistent; the x, y, and z variables must have derivatives of equal size, and where the ith derivative of one variable is taken with respect to the same quantity as the ith derviative of another variable. If either nearest_point
or distance
are nonnull, they will also contain geo_pos's
partial derivatives.
Instantiated templates for the following kinds of T's are provided:
They are already available to link against in the containing library.