Drake

Abstract API for the geometry of a road network, including both the network topology and the geometry of its embedding in 3space. More...
#include <automotive/maliput/api/road_geometry.h>
Public Member Functions  
virtual  ~RoadGeometry ()=default 
const RoadGeometryId  id () const 
Returns the persistent identifier. More...  
int  num_junctions () const 
Returns the number of Junctions in the RoadGeometry. More...  
const Junction *  junction (int index) const 
Returns the Junction indexed by index . More...  
int  num_branch_points () const 
Returns the number of BranchPoints in the RoadGeometry. More...  
const BranchPoint *  branch_point (int index) const 
Returns the BranchPoint indexed by index . More...  
RoadPosition  ToRoadPosition (const GeoPosition &geo_position, const RoadPosition *hint, GeoPosition *nearest_position, double *distance) const 
Determines the RoadPosition corresponding to GeoPosition geo_position . More...  
double  linear_tolerance () const 
Returns the tolerance guaranteed for linear measurements (positions). More...  
double  angular_tolerance () const 
Returns the tolerance guaranteed for angular measurements (orientations). More...  
std::vector< std::string >  CheckInvariants () const 
Verifies certain invariants guaranteed by the API. More...  
Does not allow copy, move, or assignment  
RoadGeometry (const RoadGeometry &)=delete  
RoadGeometry &  operator= (const RoadGeometry &)=delete 
RoadGeometry (RoadGeometry &&)=delete  
RoadGeometry &  operator= (RoadGeometry &&)=delete 
Protected Member Functions  
RoadGeometry ()=default  
Abstract API for the geometry of a road network, including both the network topology and the geometry of its embedding in 3space.

delete 

delete 

virtualdefault 
Reimplemented in RoadGeometry, RoadGeometry, RoadGeometry, and RoadGeometry.

protecteddefault 

inline 
Returns the tolerance guaranteed for angular measurements (orientations).

inline 
Returns the BranchPoint indexed by index
.
index
must be >= 0 and < num_branch_points(). std::vector< std::string > CheckInvariants  (  )  const 
Verifies certain invariants guaranteed by the API.
Returns a vector of strings describing violations of invariants. Return value with size() == 0 indicates success.

inline 
Returns the persistent identifier.
Returns the Junction indexed by index
.
index
must be >= 0 and < num_junctions().

inline 
Returns the tolerance guaranteed for linear measurements (positions).

inline 
Returns the number of BranchPoints in the RoadGeometry.
Return value is nonnegative.

inline 
Returns the number of Junctions in the RoadGeometry.
Return value is nonnegative.

delete 

delete 

inline 
Determines the RoadPosition corresponding to GeoPosition geo_position
.
If hint
is nonnull, its value is used to help determine the result.
The return value is the RoadPosition of the point in the RoadGeometry's manifold which is, in the world frame, closest to geo_position
. If nearest_position
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_position
to that nearest point.
This method guarantees that its result satisfies the condition that result.lane>ToGeoPosition(result.pos)
is within linear_tolerance()
of *nearest_position
.
The map from RoadGeometry to the world frame is not onto (as a bounded RoadGeometry cannot completely cover the unbounded Cartesian universe). If geo_position
does represent a point contained within the volume of the RoadGeometry, then result distance
is guaranteed to be less than or equal to linear_tolerance()
.
The map from RoadGeometry to world frame is not necessarily onetoone. Different (s,r,h)
coordinates from different Lanes, potentially from different Segments, may map to the same (x,y,z)
world frame location.
If geo_position
is contained within the volumes of multiple Segments, then ToRoadPosition() will choose a Segment which yields the minimum height h
value in the result. If the chosen Segment has multiple Lanes, then ToRoadPosition() will choose a Lane which contains geo_position
within its lane_bounds()
if possible, and if that is still ambiguous, it will further select a Lane which minimizes the absolute value of the lateral r
coordinate in the result.