Drake
RoadGeometry Class Referenceabstract

Abstract API for the geometry of a road network, including both the network topology and the geometry of its embedding in 3-space. More...

#include <drake/automotive/maliput/api/road_geometry.h>

Inheritance diagram for RoadGeometry:
[legend]

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 Junctionjunction (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 BranchPointbranch_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
 
RoadGeometryoperator= (const RoadGeometry &)=delete
 
 RoadGeometry (RoadGeometry &&)=delete
 
RoadGeometryoperator= (RoadGeometry &&)=delete
 

Protected Member Functions

 RoadGeometry ()=default
 

Detailed Description

Abstract API for the geometry of a road network, including both the network topology and the geometry of its embedding in 3-space.

Constructor & Destructor Documentation

RoadGeometry ( const RoadGeometry )
delete
RoadGeometry ( RoadGeometry &&  )
delete
virtual ~RoadGeometry ( )
virtualdefault
RoadGeometry ( )
protecteddefault

Here is the caller graph for this function:

Member Function Documentation

double angular_tolerance ( ) const
inline

Returns the tolerance guaranteed for angular measurements (orientations).

Here is the call graph for this function:

Here is the caller graph for this function:

const BranchPoint* branch_point ( int  index) const
inline

Returns the BranchPoint indexed by index.

Precondition
index must be >= 0 and < num_branch_points().

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

const RoadGeometryId id ( ) const
inline

Returns the persistent identifier.

Here is the caller graph for this function:

const Junction* junction ( int  index) const
inline

Returns the Junction indexed by index.

Precondition
index must be >= 0 and < num_junctions().

Here is the caller graph for this function:

double linear_tolerance ( ) const
inline

Returns the tolerance guaranteed for linear measurements (positions).

Here is the caller graph for this function:

int num_branch_points ( ) const
inline

Returns the number of BranchPoints in the RoadGeometry.

Return value is non-negative.

Here is the caller graph for this function:

int num_junctions ( ) const
inline

Returns the number of Junctions in the RoadGeometry.

Return value is non-negative.

Here is the caller graph for this function:

RoadGeometry& operator= ( RoadGeometry &&  )
delete
RoadGeometry& operator= ( const RoadGeometry )
delete
RoadPosition ToRoadPosition ( const GeoPosition geo_position,
const RoadPosition hint,
GeoPosition nearest_position,
double distance 
) const
inline

Determines the RoadPosition corresponding to GeoPosition geo_position.

If hint is non-null, 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 non-null, then it will be populated with the GeoPosition of that nearest point. If distance is non-null, 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 one-to-one. 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.

Here is the caller graph for this function:


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