Drake
RoadRulebook Class Referenceabstract

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

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

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() [1/3]

RoadRulebook ( const RoadRulebook )
delete

◆ RoadRulebook() [2/3]

RoadRulebook ( RoadRulebook &&  )
delete

◆ ~RoadRulebook()

virtual ~RoadRulebook ( )
virtualdefault

◆ RoadRulebook() [3/3]

RoadRulebook ( )
protecteddefault

Member Function Documentation

◆ FindRules()

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.

◆ GetRule() [1/2]

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

Returns the RightOfWayRule with the specified id.

Exceptions
std::out_of_rangeif id is unknown.

◆ GetRule() [2/2]

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

Returns the SpeedLimitRule with the specified id.

Exceptions
std::out_of_rangeif id is unknown.

◆ operator=() [1/2]

RoadRulebook& operator= ( const RoadRulebook )
delete

◆ operator=() [2/2]

RoadRulebook& operator= ( RoadRulebook &&  )
delete

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