maliput
|
Describes a generic rule type.
A Rule may have multiple states that affect agent behavior while it is driving through the rule's zone. The possible states of a Rule must be semantically coherent. The current state of a Rule is given by a RuleStateProvider. States can be:
#include <include/maliput/api/rules/rule.h>
Classes | |
struct | State |
Defines a base state for a Rule. More... | |
Public Types | |
using | Id = TypeSpecificIdentifier< class Rule > |
Alias for the Rule's unique ID across all Rule types. More... | |
using | TypeId = TypeSpecificIdentifier< class Type > |
Alias for the Rule's type. More... | |
using | RelatedRules = std::map< std::string, std::vector< Id > > |
Alias of a map holding groups of related rules. More... | |
using | RelatedUniqueIds = std::map< std::string, std::vector< UniqueId > > |
Alias of a map holding groups of related unique ids. More... | |
Public Member Functions | |
MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN (Rule) | |
Rule (const Id &id, const TypeId &type_id, const LaneSRoute &zone) | |
Constructs a Rule. More... | |
virtual | ~Rule ()=default |
const Id & | id () const |
const TypeId & | type_id () const |
const LaneSRoute & | zone () const |
Protected Member Functions | |
void | ValidateRelatedRules (const RelatedRules &related_rules) const |
void | ValidateRelatedUniqueIds (const RelatedUniqueIds &related_unique_ids) const |
void | ValidateSeverity (int severity) const |
using Id = TypeSpecificIdentifier<class Rule> |
using RelatedRules = std::map<std::string, std::vector<Id> > |
Alias of a map holding groups of related rules.
The name of each group is specified by the key, and the semantics vary based on the specific rule type. The group name must not be an empty string. Each vector of Rule::Id must contain unique Rule::Ids.
using RelatedUniqueIds = std::map<std::string, std::vector<UniqueId> > |
Alias of a map holding groups of related unique ids.
The name of each group is specified by the key, and the semantics vary based on the specific unique id type. The group name must not be an empty string. Each vector of UniqueId must contain unique UniqueIds.
using TypeId = TypeSpecificIdentifier<class Type> |
Rule | ( | const Id & | id, |
const TypeId & | type_id, | ||
const LaneSRoute & | zone | ||
) |
Constructs a Rule.
id | The Rule ID. |
type_id | The Rule Type ID. |
zone | LaneSRoute to which this rule applies. |
maliput::common::assertion_error | When any Rule::Id within related_rules is duplicated. |
|
virtualdefault |
const Id& id | ( | ) | const |
MALIPUT_DEFAULT_COPY_AND_MOVE_AND_ASSIGN | ( | Rule | ) |
const TypeId& type_id | ( | ) | const |
|
protected |
|
protected |
|
protected |
const LaneSRoute& zone | ( | ) | const |