Drake
RoadRulebook Class Referenceabstract

Abstract interface for querying "rules of the road". More...

#include <drake/automotive/maliput/api/rules/road_rulebook.h>

Inheritance diagram for RoadRulebook:
[legend]

Classes

struct  QueryResults
 Results of a FindRules() query. More...
 

Public Member Functions

virtual ~RoadRulebook ()=default
 
QueryResults FindRules (const std::vector< LaneSRange > &ranges, double tolerance) const
 Returns a QueryResults structure which contains any rules which are applicable to the provided ranges. More...
 
RightOfWayRule GetRule (const RightOfWayRule::Id &id) const
 Returns the RightOfWayRule with the specified id. More...
 
SpeedLimitRule GetRule (const SpeedLimitRule::Id &id) const
 Returns the SpeedLimitRule with the specified id. More...
 
Does not allow copy, move, or assignment
 RoadRulebook (const RoadRulebook &)=delete
 
RoadRulebookoperator= (const RoadRulebook &)=delete
 
 RoadRulebook (RoadRulebook &&)=delete
 
RoadRulebookoperator= (RoadRulebook &&)=delete
 

Protected Member Functions

 RoadRulebook ()=default
 

Detailed Description

Abstract interface for querying "rules of the road".

This interface provides access to static information about a road network (i.e., information determined prior to the beginning of a simulation). Some rule types may refer to additional dynamic information which will be provided by other interfaces. (For example, see RightOfWayRule.)

Concrete implementations of this interface shall be provided by implementing the pure virtual methods declared in private scope.

Constructor & Destructor Documentation

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

Here is the caller graph for this function:

Member Function Documentation

QueryResults FindRules ( const std::vector< LaneSRange > &  ranges,
double  tolerance 
) const
inline

Returns a QueryResults structure which contains any rules which are applicable to the provided ranges.

tolerance is the acceptable linear-tolerance in longitudinal s-coordinate in each range and must be non-negative. A non-zero tolerance makes the query more permissive. However, a non-zero tolerance does not permit matching across BranchPoints (past the s-bounds of a Lane).

Exceptions
std::runtime_errorif tolerance is negative.
RightOfWayRule GetRule ( const RightOfWayRule::Id id) const
inline

Returns the RightOfWayRule with the specified id.

Throws std::out_of_range if id is unknown.

SpeedLimitRule GetRule ( const SpeedLimitRule::Id id) const
inline

Returns the SpeedLimitRule with the specified id.

Throws std::out_of_range if id is unknown.

Here is the call graph for this function:

RoadRulebook& operator= ( const RoadRulebook )
delete
RoadRulebook& operator= ( RoadRulebook &&  )
delete

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