maliput
|
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.
#include <include/maliput/api/rules/road_rulebook.h>
Classes | |
struct | QueryResults |
Results of a FindRules() query. More... | |
Public Member Functions | |
MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN (RoadRulebook) | |
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... | |
QueryResults | Rules () const |
Returns all the rules in this RoadRulebook. 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... | |
DirectionUsageRule | GetRule (const DirectionUsageRule::Id &id) const |
Returns the DirectionUsageRule with the specified id . More... | |
DiscreteValueRule | GetDiscreteValueRule (const Rule::Id &id) const |
Returns the DiscreteValueRule with the specified id . More... | |
RangeValueRule | GetRangeValueRule (const Rule::Id &id) const |
Returns the RangeValueRule with the specified id . More... | |
Protected Member Functions | |
RoadRulebook ()=default | |
|
virtualdefault |
|
protecteddefault |
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
.
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).
maliput::common::assertion_error | if tolerance is negative. |
DiscreteValueRule GetDiscreteValueRule | ( | const Rule::Id & | id | ) | const |
Returns the DiscreteValueRule with the specified id
.
std::out_of_range | if id is unknown. |
RangeValueRule GetRangeValueRule | ( | const Rule::Id & | id | ) | const |
Returns the RangeValueRule with the specified id
.
std::out_of_range | if id is unknown. |
DirectionUsageRule GetRule | ( | const DirectionUsageRule::Id & | id | ) | const |
Returns the DirectionUsageRule with the specified id
.
std::out_of_range | if id is unknown. |
RightOfWayRule GetRule | ( | const RightOfWayRule::Id & | id | ) | const |
Returns the RightOfWayRule with the specified id
.
std::out_of_range | if id is unknown. |
SpeedLimitRule GetRule | ( | const SpeedLimitRule::Id & | id | ) | const |
Returns the SpeedLimitRule with the specified id
.
std::out_of_range | if id is unknown. |
MALIPUT_NO_COPY_NO_MOVE_NO_ASSIGN | ( | RoadRulebook | ) |
QueryResults Rules | ( | ) | const |
Returns all the rules in this RoadRulebook.