maliput
maliput::api::rules Namespace Reference

Classes

class  Bulb
 Models a bulb within a bulb group. More...
 
class  BulbGroup
 Models a group of bulbs within a traffic light. More...
 
class  DiscreteValueRule
 Describes a discrete value rule. More...
 
class  DiscreteValueRuleStateProvider
 Abstract interface for the state provider of DiscreteValueRules. More...
 
class  Phase
 A group of RightOfWayRule instances and their states. More...
 
class  PhaseProvider
 Abstract interface for providing the dynamic states (Phase::Id) of a collection of PhaseRings. More...
 
class  PhaseRing
 A set of mutually exclusive phases, e.g., that comprise the signaling cycle for an intersection. More...
 
class  PhaseRingBook
 Abstract interface for providing the mapping from RightOfWayRule::Id to PhaseRing. More...
 
class  RangeValueRule
 Describes a numeric range based rule. More...
 
class  RangeValueRuleStateProvider
 Abstract interface for the state provider of RangeValueRules. More...
 
class  RoadRulebook
 Abstract interface for querying "rules of the road". More...
 
class  Rule
 Describes a generic rule type. More...
 
class  RuleRegistry
 A registry for Rule types. More...
 
struct  StateProviderResult
 The state returned by a state provider. More...
 
class  TrafficLight
 Models a traffic light. More...
 
class  TrafficLightBook
 Abstract interface for providing the mapping from TrafficLight::Id to TrafficLight. More...
 
class  UniqueBulbGroupId
 Uniquely identifies a bulb group in the Inertial space. More...
 
class  UniqueBulbId
 Uniquely identifies a bulb in the Inertial space. More...
 

Typedefs

using deprecated = std::unordered_map< RightOfWayRule::Id, RightOfWayRule::State::Id >
 
using BulbStates = std::unordered_map< UniqueBulbId, BulbState >
 A mapping from a UniqueBulbId to a BulbState. More...
 
using DiscreteValueRuleStates = std::unordered_map< Rule::Id, DiscreteValueRule::DiscreteValue >
 A mapping from a Rule::Id to a DiscreteValueRule::DiscreteValue. More...
 
using DiscreteValueRuleTypeAndValues = std::pair< Rule::TypeId, std::vector< DiscreteValueRule::DiscreteValue > >
 Convenient alias for clients that define DiscreteValueRule types. More...
 
using RangeValueRuleTypeAndValues = std::pair< Rule::TypeId, std::vector< RangeValueRule::Range > >
 Convenient alias for clients that define RangeValueRule types. More...
 

Enumerations

enum  BulbColor { kRed = 0, kYellow, kGreen }
 Defines the possible bulb colors. More...
 
enum  BulbType { kRound = 0, kArrow }
 Defines the possible bulb types. More...
 
enum  BulbState { kOff = 0, kOn, kBlinking }
 Defines the possible bulb states. More...
 

Functions

common::ComparisonResult< RuleStates > IsEqual (const RuleStates &a, const RuleStates &b)
 Evaluates the equality of two RuleStates. More...
 
common::ComparisonResult< PhaseIsEqual (const Phase &a, const Phase &b)
 Evaluates the equality of two Phase. More...
 
common::ComparisonResult< PhaseRing::NextPhaseIsEqual (const PhaseRing::NextPhase &a, const PhaseRing::NextPhase &b)
 Evaluates the equality of two PhaseRing::NextPhase. More...
 
common::ComparisonResult< std::vector< PhaseRing::NextPhase > > IsEqual (const std::vector< PhaseRing::NextPhase > &a, const std::vector< PhaseRing::NextPhase > &b)
 Evaluates the equality of two std::vector<PhaseRing::NextPhase>. More...
 
common::ComparisonResult< RangeValueRule::RangeIsEqual (const RangeValueRule::Range &a, const RangeValueRule::Range &b)
 Evaluates the equality of two RangeValueRule::Range. More...
 
common::ComparisonResult< RangeValueRuleIsEqual (const RangeValueRule &a, const RangeValueRule &b)
 Evaluates the equality of two RangeValueRule. More...
 
common::ComparisonResult< std::vector< RangeValueRule::Range > > IsEqual (const std::vector< RangeValueRule::Range > &a, const std::vector< RangeValueRule::Range > &b)
 Evaluates the equality of two std::vector<RangeValueRule::Range>. More...
 
common::ComparisonResult< DiscreteValueRule::DiscreteValueIsEqual (const DiscreteValueRule::DiscreteValue &a, const DiscreteValueRule::DiscreteValue &b)
 Evaluates the equality of two DiscreteValueRule::DiscreteValue. More...
 
common::ComparisonResult< DiscreteValueRuleIsEqual (const DiscreteValueRule &a, const DiscreteValueRule &b)
 Evaluates the equality of two DiscreteValueRule. More...
 
common::ComparisonResult< std::vector< DiscreteValueRule::DiscreteValue > > IsEqual (const std::vector< DiscreteValueRule::DiscreteValue > &a, const std::vector< DiscreteValueRule::DiscreteValue > &b)
 Evaluates the equality of two std::vector<DiscreteValueRule::DiscreteValue>. More...
 
common::ComparisonResult< std::unordered_map< Rule::Id, DiscreteValueRule::DiscreteValue > > IsEqual (const std::unordered_map< Rule::Id, DiscreteValueRule::DiscreteValue > &a, const std::unordered_map< Rule::Id, DiscreteValueRule::DiscreteValue > &b)
 Evaluates the equality of two std::unordered_map<Rule::Id, DiscreteValueRule::DiscreteValue>. More...
 
common::ComparisonResult< DirectionUsageRule::State::Type > IsEqual (DirectionUsageRule::State::Type a, DirectionUsageRule::State::Type b)
 Evaluates the equality of two DirectionUsageRule::State::Type. More...
 
common::ComparisonResult< DirectionUsageRule::State::Severity > IsEqual (DirectionUsageRule::State::Severity a, DirectionUsageRule::State::Severity b)
 Evaluates the equality of two DirectionUsageRule::State::Severity. More...
 
common::ComparisonResult< DirectionUsageRule::State > IsEqual (const DirectionUsageRule::State &a, const DirectionUsageRule::State &b)
 Evaluates the equality of two DirectionUsageRule::State. More...
 
common::ComparisonResult< std::unordered_map< DirectionUsageRule::State::Id, DirectionUsageRule::State > > IsEqual (const std::unordered_map< DirectionUsageRule::State::Id, DirectionUsageRule::State > &a, const std::unordered_map< DirectionUsageRule::State::Id, DirectionUsageRule::State > &b)
 Evaluates the equality of two std::unordered_map<DirectionUsageRule::State::Id, DirectionUsageRule::State>. More...
 
common::ComparisonResult< DirectionUsageRule > IsEqual (const DirectionUsageRule &a, const DirectionUsageRule &b)
 Evaluates the equality of two DirectionUsageRule. More...
 
common::ComparisonResult< RightOfWayRule::ZoneType > IsEqual (RightOfWayRule::ZoneType a, RightOfWayRule::ZoneType b)
 Evaluates the equality of two RightOfWayRule::ZoneType. More...
 
common::ComparisonResult< RightOfWayRule::State::Type > IsEqual (RightOfWayRule::State::Type a, RightOfWayRule::State::Type b)
 Evaluates the equality of two RightOfWayRule::State::Type. More...
 
common::ComparisonResult< std::vector< RightOfWayRule::Id > > IsEqual (const std::vector< RightOfWayRule::Id > &a, const std::vector< RightOfWayRule::Id > &b)
 Evaluates the equality of two std::vector<RightOfWayRule::Id>. More...
 
common::ComparisonResult< RightOfWayRule::State > IsEqual (const RightOfWayRule::State &a, const RightOfWayRule::State &b)
 Evaluates the equality of two RightOfWayRule::State. More...
 
common::ComparisonResult< std::unordered_map< RightOfWayRule::State::Id, RightOfWayRule::State > > IsEqual (const std::unordered_map< RightOfWayRule::State::Id, RightOfWayRule::State > &a, const std::unordered_map< RightOfWayRule::State::Id, RightOfWayRule::State > &b)
 Evaluates the equality of two std::unordered_map<RightOfWayRule::State::Id, RightOfWayRule::State>. More...
 
common::ComparisonResult< RightOfWayRule > IsEqual (const RightOfWayRule &a, const RightOfWayRule &b)
 Evaluates the equality of two RightOfWayRule. More...
 
common::ComparisonResult< RightOfWayRuleStateProvider::RightOfWayResult > IsEqual (const RightOfWayRuleStateProvider::RightOfWayResult &a, const RightOfWayRuleStateProvider::RightOfWayResult &b)
 Evaluates the equality of two RightOfWayRuleStateProvider::RightOfWayResult. More...
 
common::ComparisonResult< SpeedLimitRule::Severity > IsEqual (SpeedLimitRule::Severity a, SpeedLimitRule::Severity b)
 Evaluates the equality of two SpeedLimitRule::Severity. More...
 
common::ComparisonResult< SpeedLimitRule > IsEqual (const SpeedLimitRule &a, const SpeedLimitRule &b)
 Evaluates the equality of two SpeedLimitRule. More...
 
common::ComparisonResult< std::unordered_map< TrafficLight::Id, std::vector< BulbGroup::Id > > > IsEqual (const std::unordered_map< TrafficLight::Id, std::vector< BulbGroup::Id >> &a, const std::unordered_map< TrafficLight::Id, std::vector< BulbGroup::Id >> &b)
 Evaluates the equality of two std::unordered_map<TrafficLight::Id, std::vector<BulbGroup::Id>>. More...
 
common::ComparisonResult< BulbColorIsEqual (const BulbColor &a, const BulbColor &b)
 Evaluates the equality of two BulbColor. More...
 
common::ComparisonResult< BulbTypeIsEqual (const BulbType &a, const BulbType &b)
 Evaluates the equality of two BulbType. More...
 
common::ComparisonResult< BulbStateIsEqual (const BulbState &a, const BulbState &b)
 Evaluates the equality of two BulbState. More...
 
common::ComparisonResult< std::optional< BulbStates > > IsEqual (const std::optional< BulbStates > &a, const std::optional< BulbStates > &b)
 Evaluates the equality of two std::optional<BulbStates>. More...
 
common::ComparisonResult< std::optional< double > > IsEqual (const std::optional< double > &a, const std::optional< double > &b)
 Evaluates the equality of two std::optional<double>. More...
 
common::ComparisonResult< Bulb::BoundingBoxIsEqual (const Bulb::BoundingBox &a, const Bulb::BoundingBox &b)
 Evaluates the equality of two Bulb::BoundingBox. More...
 
common::ComparisonResult< BulbIsEqual (const Bulb *a, const Bulb *b)
 Evaluates the equality of two Bulb. More...
 
common::ComparisonResult< std::vector< const Bulb * > > IsEqual (const char *a_expression, const char *b_expression, const std::vector< const Bulb * > &a, const std::vector< const Bulb * > &b)
 Evaluates the equality of two std::vector<const Bulb*>. More...
 
common::ComparisonResult< BulbGroupIsEqual (const BulbGroup *a, const BulbGroup *b)
 Evaluates the equality of two BulbGroup. More...
 
common::ComparisonResult< TrafficLightIsEqual (const TrafficLight *a, const TrafficLight *b)
 Evaluates the equality of two TrafficLight. More...
 
class MALIPUT_DEPRECATED ("DirectionUsageRule will be deprecated", "DiscreteValueRule") DirectionUsageRule final
 Rule describing direction usage for a road lane. More...
 
class MALIPUT_DEPRECATED ("RightOfWayRule class will be deprecated", "DiscreteValueRule") RightOfWayRule final
 Rule describing right-of-way, a.k.a. More...
 
class MALIPUT_DEPRECATED ("RigthOfWayRule class will be deprecated.") RightOfWayRuleStateProvider
 Abstract interface for the provider of the RightOfWayRule. More...
 
class MALIPUT_DEPRECATED ("next release", "Use RangeValueRule instead.") SpeedLimitRule
 Rule describing speed limits. More...
 
std::unordered_map< BulbColor, const char *, maliput::common::DefaultHashBulbColorMapper ()
 Maps BulbColor enums to string representations. More...
 
std::unordered_map< BulbType, const char *, maliput::common::DefaultHashBulbTypeMapper ()
 Maps BulbType enums to string representations. More...
 
std::unordered_map< BulbState, const char *, maliput::common::DefaultHashBulbStateMapper ()
 Maps BulbState enums to string representations. More...
 
common::ComparisonResult< rules::RightOfWayRule::ZoneType > IsEqual (rules::RightOfWayRule::ZoneType a, rules::RightOfWayRule::ZoneType b)
 
common::ComparisonResult< rules::RightOfWayRule::State::Type > IsEqual (rules::RightOfWayRule::State::Type a, rules::RightOfWayRule::State::Type b)
 
common::ComparisonResult< std::vector< rules::RightOfWayRule::Id > > IsEqual (const std::vector< rules::RightOfWayRule::Id > &a, const std::vector< rules::RightOfWayRule::Id > &b)
 
common::ComparisonResult< rules::RightOfWayRule::State > IsEqual (const rules::RightOfWayRule::State &a, const rules::RightOfWayRule::State &b)
 
common::ComparisonResult< std::unordered_map< rules::RightOfWayRule::State::Id, rules::RightOfWayRule::State > > IsEqual (const std::unordered_map< rules::RightOfWayRule::State::Id, rules::RightOfWayRule::State > &a, const std::unordered_map< rules::RightOfWayRule::State::Id, rules::RightOfWayRule::State > &b)
 
common::ComparisonResult< rules::RightOfWayRuleStateProvider::RightOfWayResult > IsEqual (const rules::RightOfWayRuleStateProvider::RightOfWayResult &a, const rules::RightOfWayRuleStateProvider::RightOfWayResult &b)
 
common::ComparisonResult< rules::SpeedLimitRule::Severity > IsEqual (rules::SpeedLimitRule::Severity a, rules::SpeedLimitRule::Severity b)
 
common::ComparisonResult< rules::SpeedLimitRule > IsEqual (const rules::SpeedLimitRule &a, const rules::SpeedLimitRule &b)
 

Typedef Documentation

◆ BulbStates

using BulbStates = std::unordered_map<UniqueBulbId, BulbState>

A mapping from a UniqueBulbId to a BulbState.

Just an alias for user convenience.

◆ deprecated

using deprecated = std::unordered_map<RightOfWayRule::Id, RightOfWayRule::State::Id>

◆ DiscreteValueRuleStates

A mapping from a Rule::Id to a DiscreteValueRule::DiscreteValue.

Just an alias for user convenience.

◆ DiscreteValueRuleTypeAndValues

Convenient alias for clients that define DiscreteValueRule types.

◆ RangeValueRuleTypeAndValues

Convenient alias for clients that define RangeValueRule types.

Enumeration Type Documentation

◆ BulbColor

enum BulbColor
strong

Defines the possible bulb colors.

Enumerator
kRed 
kYellow 
kGreen 

◆ BulbState

enum BulbState
strong

Defines the possible bulb states.

Enumerator
kOff 
kOn 
kBlinking 

◆ BulbType

enum BulbType
strong

Defines the possible bulb types.

Enumerator
kRound 
kArrow 

Function Documentation

◆ BulbColorMapper()

std::unordered_map< BulbColor, const char *, maliput::common::DefaultHash > BulbColorMapper ( )

Maps BulbColor enums to string representations.

◆ BulbStateMapper()

std::unordered_map< BulbState, const char *, maliput::common::DefaultHash > BulbStateMapper ( )

Maps BulbState enums to string representations.

◆ BulbTypeMapper()

std::unordered_map< BulbType, const char *, maliput::common::DefaultHash > BulbTypeMapper ( )

Maps BulbType enums to string representations.

◆ IsEqual() [1/44]

common::ComparisonResult< Bulb > IsEqual ( const Bulb a,
const Bulb b 
)

Evaluates the equality of two Bulb.

Parameters
aThe first Bulb to compare.
bThe second Bulb to compare.
Returns
A ComparisonResult indicating whether the two Bulb are equal.

◆ IsEqual() [2/44]

Evaluates the equality of two Bulb::BoundingBox.

Parameters
aThe first Bulb::BoundingBox to compare.
bThe second Bulb::BoundingBox to compare.
Returns
A ComparisonResult indicating whether the two Bulb::BoundingBox are equal.

◆ IsEqual() [3/44]

common::ComparisonResult< BulbColor > IsEqual ( const BulbColor a,
const BulbColor b 
)

Evaluates the equality of two BulbColor.

Parameters
aThe first BulbColor to compare.
bThe second BulbColor to compare.
Returns
A ComparisonResult indicating whether the two BulbColor are equal.

◆ IsEqual() [4/44]

common::ComparisonResult< BulbGroup > IsEqual ( const BulbGroup a,
const BulbGroup b 
)

Evaluates the equality of two BulbGroup.

Parameters
aThe first BulbGroup to compare.
bThe second BulbGroup to compare.
Returns
A ComparisonResult indicating whether the two BulbGroup are equal.

◆ IsEqual() [5/44]

common::ComparisonResult< BulbState > IsEqual ( const BulbState a,
const BulbState b 
)

Evaluates the equality of two BulbState.

Parameters
aThe first BulbState to compare.
bThe second BulbState to compare.
Returns
A ComparisonResult indicating whether the two BulbState are equal.

◆ IsEqual() [6/44]

common::ComparisonResult< BulbType > IsEqual ( const BulbType a,
const BulbType b 
)

Evaluates the equality of two BulbType.

Parameters
aThe first BulbType to compare.
bThe second BulbType to compare.
Returns
A ComparisonResult indicating whether the two BulbType are equal.

◆ IsEqual() [7/44]

common::ComparisonResult< std::vector< const Bulb * > > IsEqual ( const char *  a_expression,
const char *  b_expression,
const std::vector< const Bulb * > &  a,
const std::vector< const Bulb * > &  b 
)

Evaluates the equality of two std::vector<const Bulb*>.

Parameters
a_expressionThe expression of the first std::vector<const Bulb*> to compare.
b_expressionThe expression of the second std::vector<const Bulb*> to compare.
aThe first std::vector<const Bulb*> to compare.
bThe second std::vector<const Bulb*> to compare.
Returns
A ComparisonResult indicating whether the two std::vector<const Bulb*> are equal.

◆ IsEqual() [8/44]

common::ComparisonResult< DirectionUsageRule > IsEqual ( const DirectionUsageRule &  a,
const DirectionUsageRule &  b 
)

Evaluates the equality of two DirectionUsageRule.

Parameters
aThe first DirectionUsageRule to compare.
bThe second DirectionUsageRule to compare.
Returns
A ComparisonResult indicating whether the two DirectionUsageRule are equal.

◆ IsEqual() [9/44]

common::ComparisonResult< DirectionUsageRule::State > IsEqual ( const DirectionUsageRule::State &  a,
const DirectionUsageRule::State &  b 
)

Evaluates the equality of two DirectionUsageRule::State.

Parameters
aThe first DirectionUsageRule::State to compare.
bThe second DirectionUsageRule::State to compare.
Returns
A ComparisonResult indicating whether the two DirectionUsageRule::State are equal.

◆ IsEqual() [10/44]

Evaluates the equality of two DiscreteValueRule.

Parameters
aThe first DiscreteValueRule to compare.
bThe second DiscreteValueRule to compare.
Returns
A ComparisonResult indicating whether the two DiscreteValueRule are equal.

◆ IsEqual() [11/44]

Evaluates the equality of two DiscreteValueRule::DiscreteValue.

Parameters
aThe first DiscreteValueRule::DiscreteValue to compare.
bThe second DiscreteValueRule::DiscreteValue to compare.
Returns
A ComparisonResult indicating whether the two DiscreteValueRule::DiscreteValue are equal.

◆ IsEqual() [12/44]

common::ComparisonResult< Phase > IsEqual ( const Phase a,
const Phase b 
)

Evaluates the equality of two Phase.

Parameters
aThe first Phase to compare.
bThe second Phase to compare.
Returns
A ComparisonResult indicating whether the two Phase are equal.

◆ IsEqual() [13/44]

Evaluates the equality of two PhaseRing::NextPhase.

Parameters
aThe first PhaseRing::NextPhase to compare.
bThe second PhaseRing::NextPhase to compare.
Returns
A ComparisonResult indicating whether the two PhaseRing::NextPhase are equal.

◆ IsEqual() [14/44]

common::ComparisonResult< RangeValueRule > IsEqual ( const RangeValueRule a,
const RangeValueRule b 
)

Evaluates the equality of two RangeValueRule.

Parameters
aThe first RangeValueRule to compare.
bThe second RangeValueRule to compare.
Returns
A ComparisonResult indicating whether the two RangeValueRule are equal.

◆ IsEqual() [15/44]

Evaluates the equality of two RangeValueRule::Range.

Parameters
aThe first RangeValueRule::Range to compare.
bThe second RangeValueRule::Range to compare.
Returns
A ComparisonResult indicating whether the two RangeValueRule::Range are equal.

◆ IsEqual() [16/44]

common::ComparisonResult< rules::RightOfWayRule > IsEqual ( const RightOfWayRule &  a,
const RightOfWayRule &  b 
)

Evaluates the equality of two RightOfWayRule.

Parameters
aThe first RightOfWayRule to compare.
bThe second RightOfWayRule to compare.
Returns
A ComparisonResult indicating whether the two RightOfWayRule are equal.

◆ IsEqual() [17/44]

common::ComparisonResult<RightOfWayRule::State> maliput::api::rules::IsEqual ( const RightOfWayRule::State &  a,
const RightOfWayRule::State &  b 
)

Evaluates the equality of two RightOfWayRule::State.

Parameters
aThe first RightOfWayRule::State to compare.
bThe second RightOfWayRule::State to compare.
Returns
A ComparisonResult indicating whether the two RightOfWayRule::State are equal.

◆ IsEqual() [18/44]

common::ComparisonResult<RightOfWayRuleStateProvider::RightOfWayResult> maliput::api::rules::IsEqual ( const RightOfWayRuleStateProvider::RightOfWayResult &  a,
const RightOfWayRuleStateProvider::RightOfWayResult &  b 
)

Evaluates the equality of two RightOfWayRuleStateProvider::RightOfWayResult.

Parameters
aThe first RightOfWayRuleStateProvider::RightOfWayResult to compare.
bThe second RightOfWayRuleStateProvider::RightOfWayResult to compare.
Returns
A ComparisonResult indicating whether the two RightOfWayRuleStateProvider::RightOfWayResult are equal.

◆ IsEqual() [19/44]

common::ComparisonResult<rules::RightOfWayRule::State> maliput::api::rules::IsEqual ( const rules::RightOfWayRule::State &  a,
const rules::RightOfWayRule::State &  b 
)

◆ IsEqual() [20/44]

common::ComparisonResult<rules::RightOfWayRuleStateProvider::RightOfWayResult> maliput::api::rules::IsEqual ( const rules::RightOfWayRuleStateProvider::RightOfWayResult &  a,
const rules::RightOfWayRuleStateProvider::RightOfWayResult &  b 
)

◆ IsEqual() [21/44]

common::ComparisonResult<rules::SpeedLimitRule> maliput::api::rules::IsEqual ( const rules::SpeedLimitRule &  a,
const rules::SpeedLimitRule &  b 
)

◆ IsEqual() [22/44]

common::ComparisonResult< RuleStates > IsEqual ( const RuleStates &  a,
const RuleStates &  b 
)

Evaluates the equality of two RuleStates.

Parameters
aThe first RuleStates to compare.
bThe second RuleStates to compare.
Returns
A ComparisonResult indicating whether the two RuleStates are equal.

◆ IsEqual() [23/44]

common::ComparisonResult<SpeedLimitRule> maliput::api::rules::IsEqual ( const SpeedLimitRule &  a,
const SpeedLimitRule &  b 
)

Evaluates the equality of two SpeedLimitRule.

Parameters
aThe first SpeedLimitRule to compare.
bThe second SpeedLimitRule to compare.
Returns
A ComparisonResult indicating whether the two SpeedLimitRule are equal.

◆ IsEqual() [24/44]

common::ComparisonResult< std::optional< BulbStates > > IsEqual ( const std::optional< BulbStates > &  a,
const std::optional< BulbStates > &  b 
)

Evaluates the equality of two std::optional<BulbStates>.

Parameters
aThe first std::optional<BulbStates> to compare.
bThe second std::optional<BulbStates> to compare.
Returns
A ComparisonResult indicating whether the two std::optional<BulbStates> are equal.

◆ IsEqual() [25/44]

common::ComparisonResult< std::optional< double > > IsEqual ( const std::optional< double > &  a,
const std::optional< double > &  b 
)

Evaluates the equality of two std::optional<double>.

Parameters
aThe first std::optional<double> to compare.
bThe second std::optional<double> to compare.
Returns
A ComparisonResult indicating whether the two std::optional<double> are equal.

◆ IsEqual() [26/44]

common::ComparisonResult< std::unordered_map< DirectionUsageRule::State::Id, DirectionUsageRule::State > > IsEqual ( const std::unordered_map< DirectionUsageRule::State::Id, DirectionUsageRule::State > &  a,
const std::unordered_map< DirectionUsageRule::State::Id, DirectionUsageRule::State > &  b 
)

Evaluates the equality of two std::unordered_map<DirectionUsageRule::State::Id, DirectionUsageRule::State>.

Parameters
aThe first std::unordered_map<DirectionUsageRule::State::Id, DirectionUsageRule::State> to compare.
bThe second std::unordered_map<DirectionUsageRule::State::Id, DirectionUsageRule::State> to compare.
Returns
A ComparisonResult indicating whether the two std::unordered_map<DirectionUsageRule::State::Id, DirectionUsageRule::State> are equal.

◆ IsEqual() [27/44]

common::ComparisonResult<std::unordered_map<RightOfWayRule::State::Id, RightOfWayRule::State> > maliput::api::rules::IsEqual ( const std::unordered_map< RightOfWayRule::State::Id, RightOfWayRule::State > &  a,
const std::unordered_map< RightOfWayRule::State::Id, RightOfWayRule::State > &  b 
)

Evaluates the equality of two std::unordered_map<RightOfWayRule::State::Id, RightOfWayRule::State>.

Parameters
aThe first std::unordered_map<RightOfWayRule::State::Id, RightOfWayRule::State> to compare.
bThe second std::unordered_map<RightOfWayRule::State::Id, RightOfWayRule::State> to compare.
Returns
A ComparisonResult indicating whether the two std::unordered_map<RightOfWayRule::State::Id, RightOfWayRule::State> are equal.

◆ IsEqual() [28/44]

common::ComparisonResult< std::unordered_map< Rule::Id, DiscreteValueRule::DiscreteValue > > IsEqual ( const std::unordered_map< Rule::Id, DiscreteValueRule::DiscreteValue > &  a,
const std::unordered_map< Rule::Id, DiscreteValueRule::DiscreteValue > &  b 
)

Evaluates the equality of two std::unordered_map<Rule::Id, DiscreteValueRule::DiscreteValue>.

Parameters
aThe first std::unordered_map<Rule::Id, DiscreteValueRule::DiscreteValue> to compare.
bThe second std::unordered_map<Rule::Id, DiscreteValueRule::DiscreteValue> to compare.
Returns
A ComparisonResult indicating whether the two std::unordered_map<Rule::Id, DiscreteValueRule::DiscreteValue> are equal.

◆ IsEqual() [29/44]

common::ComparisonResult<std::unordered_map<rules::RightOfWayRule::State::Id, rules::RightOfWayRule::State> > maliput::api::rules::IsEqual ( const std::unordered_map< rules::RightOfWayRule::State::Id, rules::RightOfWayRule::State > &  a,
const std::unordered_map< rules::RightOfWayRule::State::Id, rules::RightOfWayRule::State > &  b 
)

◆ IsEqual() [30/44]

common::ComparisonResult< std::unordered_map< TrafficLight::Id, std::vector< BulbGroup::Id > > > IsEqual ( const std::unordered_map< TrafficLight::Id, std::vector< BulbGroup::Id >> &  a,
const std::unordered_map< TrafficLight::Id, std::vector< BulbGroup::Id >> &  b 
)

Evaluates the equality of two std::unordered_map<TrafficLight::Id, std::vector<BulbGroup::Id>>.

Parameters
aThe first std::unordered_map<TrafficLight::Id, std::vector<BulbGroup::Id>> to compare.
bThe second std::unordered_map<TrafficLight::Id, std::vector<BulbGroup::Id>> to compare.
Returns
A ComparisonResult indicating whether the two std::unordered_map<TrafficLight::Id, std::vector<BulbGroup::Id>> are equal.

◆ IsEqual() [31/44]

common::ComparisonResult< std::vector< DiscreteValueRule::DiscreteValue > > IsEqual ( const std::vector< DiscreteValueRule::DiscreteValue > &  a,
const std::vector< DiscreteValueRule::DiscreteValue > &  b 
)

Evaluates the equality of two std::vector<DiscreteValueRule::DiscreteValue>.

Parameters
aThe first std::vector<DiscreteValueRule::DiscreteValue> to compare.
bThe second std::vector<DiscreteValueRule::DiscreteValue> to compare.
Returns
A ComparisonResult indicating whether the two std::vector<DiscreteValueRule::DiscreteValue> are equal.

◆ IsEqual() [32/44]

common::ComparisonResult< std::vector< PhaseRing::NextPhase > > IsEqual ( const std::vector< PhaseRing::NextPhase > &  a,
const std::vector< PhaseRing::NextPhase > &  b 
)

Evaluates the equality of two std::vector<PhaseRing::NextPhase>.

Parameters
aThe first std::vector<PhaseRing::NextPhase> to compare.
bThe second std::vector<PhaseRing::NextPhase> to compare.
Returns
A ComparisonResult indicating whether the two std::vector<PhaseRing::NextPhase> are equal.

◆ IsEqual() [33/44]

common::ComparisonResult< std::vector< rules::RangeValueRule::Range > > IsEqual ( const std::vector< RangeValueRule::Range > &  a,
const std::vector< RangeValueRule::Range > &  b 
)

Evaluates the equality of two std::vector<RangeValueRule::Range>.

Parameters
aThe first std::vector<RangeValueRule::Range> to compare.
bThe second std::vector<RangeValueRule::Range> to compare.
Returns
A ComparisonResult indicating whether the two std::vector<RangeValueRule::Range> are equal.

◆ IsEqual() [34/44]

common::ComparisonResult<std::vector<RightOfWayRule::Id> > maliput::api::rules::IsEqual ( const std::vector< RightOfWayRule::Id > &  a,
const std::vector< RightOfWayRule::Id > &  b 
)

Evaluates the equality of two std::vector<RightOfWayRule::Id>.

Parameters
aThe first std::vector<RightOfWayRule::Id> to compare.
bThe second std::vector<RightOfWayRule::Id> to compare.
Returns
A ComparisonResult indicating whether the two std::vector<RightOfWayRule::Id> are equal.

◆ IsEqual() [35/44]

common::ComparisonResult<std::vector<rules::RightOfWayRule::Id> > maliput::api::rules::IsEqual ( const std::vector< rules::RightOfWayRule::Id > &  a,
const std::vector< rules::RightOfWayRule::Id > &  b 
)

◆ IsEqual() [36/44]

common::ComparisonResult< TrafficLight > IsEqual ( const TrafficLight a,
const TrafficLight b 
)

Evaluates the equality of two TrafficLight.

Parameters
aThe first TrafficLight to compare.
bThe second TrafficLight to compare.
Returns
A ComparisonResult indicating whether the two TrafficLight are equal.

◆ IsEqual() [37/44]

common::ComparisonResult< DirectionUsageRule::State::Severity > IsEqual ( DirectionUsageRule::State::Severity  a,
DirectionUsageRule::State::Severity  b 
)

Evaluates the equality of two DirectionUsageRule::State::Severity.

Parameters
aThe first DirectionUsageRule::State::Severity to compare.
bThe second DirectionUsageRule::State::Severity to compare.
Returns
A ComparisonResult indicating whether the two DirectionUsageRule::State::Severity are equal.

◆ IsEqual() [38/44]

common::ComparisonResult< DirectionUsageRule::State::Type > IsEqual ( DirectionUsageRule::State::Type  a,
DirectionUsageRule::State::Type  b 
)

Evaluates the equality of two DirectionUsageRule::State::Type.

Parameters
aThe first DirectionUsageRule::State::Type to compare.
bThe second DirectionUsageRule::State::Type to compare.
Returns
A ComparisonResult indicating whether the two DirectionUsageRule::State::Type are equal.

◆ IsEqual() [39/44]

common::ComparisonResult<RightOfWayRule::State::Type> maliput::api::rules::IsEqual ( RightOfWayRule::State::Type  a,
RightOfWayRule::State::Type  b 
)

Evaluates the equality of two RightOfWayRule::State::Type.

Parameters
aThe first RightOfWayRule::State::Type to compare.
bThe second RightOfWayRule::State::Type to compare.
Returns
A ComparisonResult indicating whether the two RightOfWayRule::State::Type are equal.

◆ IsEqual() [40/44]

common::ComparisonResult<RightOfWayRule::ZoneType> maliput::api::rules::IsEqual ( RightOfWayRule::ZoneType  a,
RightOfWayRule::ZoneType  b 
)

Evaluates the equality of two RightOfWayRule::ZoneType.

Parameters
aThe first RightOfWayRule::ZoneType to compare.
bThe second RightOfWayRule::ZoneType to compare.
Returns
A ComparisonResult indicating whether the two RightOfWayRule::ZoneType are equal.

◆ IsEqual() [41/44]

common::ComparisonResult<rules::RightOfWayRule::State::Type> maliput::api::rules::IsEqual ( rules::RightOfWayRule::State::Type  a,
rules::RightOfWayRule::State::Type  b 
)

◆ IsEqual() [42/44]

common::ComparisonResult<rules::RightOfWayRule::ZoneType> maliput::api::rules::IsEqual ( rules::RightOfWayRule::ZoneType  a,
rules::RightOfWayRule::ZoneType  b 
)

◆ IsEqual() [43/44]

common::ComparisonResult<rules::SpeedLimitRule::Severity> maliput::api::rules::IsEqual ( rules::SpeedLimitRule::Severity  a,
rules::SpeedLimitRule::Severity  b 
)

◆ IsEqual() [44/44]

common::ComparisonResult<SpeedLimitRule::Severity> maliput::api::rules::IsEqual ( SpeedLimitRule::Severity  a,
SpeedLimitRule::Severity  b 
)

Evaluates the equality of two SpeedLimitRule::Severity.

Parameters
aThe first SpeedLimitRule::Severity to compare.
bThe second SpeedLimitRule::Severity to compare.
Returns
A ComparisonResult indicating whether the two SpeedLimitRule::Severity are equal.

◆ MALIPUT_DEPRECATED() [1/4]

class maliput::api::rules::MALIPUT_DEPRECATED ( "DirectionUsageRule will be deprecated ,
"DiscreteValueRule"   
)
final

Rule describing direction usage for a road lane.

DirectionUsageRules are comprised of:

  • a zone (a LaneSRange) which specifies the longitudinal section of the road-network to which the rule instance applies.
  • a catalog of one or more States, each of which indicate the possible DirectionUsageRule semantics for a vehicle traversing the zone.

A rule instance with a single State is considered "static", and has fixed semantics.

Each Lane location can be governed by at most one DirectionUsageRule.

Semantic state of the DirectionUsageRule. A State describes the current usage semantics of the lane section. This includes which direction traffic is allowed to travel on the lane and the severity of this restriction.

Unique identifier for a State

No vehicle should travel on this lane in violation of this rule.

Vehicles should avoid travelling against this rule but certain exceptions apply. E.g. passing is allowed.

Type of allowed travel on the lane. Categorized based on travel with or against the central axis (+S) of the lane frame.

Travel should proceed in the direction of the +S axis.

Travel should proceed opposite the +S axis direction.

Travel is allowed both with the lane direction(+S) or against it.

Travel is allowed both with the lane direction(+S) or against it but should be limited in duration, e.g. when approaching turns.

Travel on this lane is prohibited.

This lane is used to define a parking area.

There is no defined direction of travel on this lane.

Constructs a State instance.

Parameters
idthe unique Id
typethe semantic Type
severitythe Severity of the State

Returns the Id.

Returns the Type.

Returns the Severity.

Constructs a DirectionUsageRule.

Parameters
idthe unique ID of this rule (in the RoadRulebook)
zoneLaneSRange to which this rule applies
statesa vector of valid states for the rule
Exceptions
maliput::common::assertion_errorif size of states is not exactly

Returns the persistent identifier.

Returns the zone to which this rule instance applies.

Returns the catalog of possible States.

Returns true if the rule is static, i.e. has only one state, otherwise false.

Returns the static state of the rule.

This is a convenience function for returning a static rule's single state.

Exceptions
maliput::common::assertion_errorif is_static() is false.

Maps DirectionUsageRule::State::Type enums to string representations.

◆ MALIPUT_DEPRECATED() [2/4]

class maliput::api::rules::MALIPUT_DEPRECATED ( "next release"  ,
"Use RangeValueRule instead."   
)

Rule describing speed limits.

Each rule instance describes speed limits applied to a longitudinal portion of a Lane (which may be the entire length of the Lane). Each instance is tagged with a severity; multiple instances with different severities may apply to the same region of the road network.

Each instance mandates a maximum speed limit as well as a minimum speed limit. Since neither limit may be less than zero, a minimum limit of exactly zero is equivalent to having no minimum limit at all.

Severity classification.

< A strict limit is the established mandatory limit.

< An advisory limit is a recommendation, typically reflecting a road condition (e.g., a sharp curve).

Constructs a SpeedLimitRule.

Parameters
idthe unique ID of this rule (in the RoadRulebook)
zoneLaneSRange to which this rule applies
severitySeverity of the rule
minminimum speed
maxmaximum speed

min and max must be non-negative, and min must be less than or equal to max, otherwise a maliput::common::assertion_error is thrown.

Returns the persistent identifier.

Returns the zone to which this rule instance applies.

Returns the severity of this rule instance.

Returns the minimum limit.

Returns the maximum limit.

◆ MALIPUT_DEPRECATED() [3/4]

class maliput::api::rules::MALIPUT_DEPRECATED ( "RightOfWayRule class will be deprecated ,
"DiscreteValueRule"   
)
final

Rule describing right-of-way, a.k.a.

priority.

Right-of-way rules cover things like stop signs, yield signs, and traffic lights: in other words, control over how competing traffic flows take turns traversing regions of the road network.

Each rule instance comprises:

  • a zone (a LaneSRoute) which specifies a contiguous longitudinal lane-wise section of the road network to which the rule instance applies;
  • a ZoneType describing whether or not stopping within the zone is allowed;
  • a catalog of one or more States, each of which indicate the possible right-of-way semantics for a vehicle traversing the zone.
  • a collection of related BulbGroup::Ids and their respective TrafficLight::Ids.

The zone is directed; the rule applies to vehicles traveling forward through the zone.

A rule instance with a single State is considered "static", and has fixed semantics. A rule instance with multiple States is considered "dynamic" and determination of the active rule State at any given time is delegated to a RuleStateProvider agent, linked by the rule's Id.

Rules and BulbGroups are linked via a many-to-many relationship. The Rule-to-BulbGroups relationship is stored in this class.

Unique identifier for a RightOfWayRule.

Alias for the related bulb groups type.

Description of stopping properties of the zone.

< Vehicles should not stop within the zone; vehicles should avoid entering the zone if traffic conditions may cause them to stop within the zone. Vehicles already in the zone when a kStop state occurs should exit the zone.

< Vehicles are allowed to stop within the zone.

Semantic state of a RightOfWayRule.

A State describes the semantic state of a RightOfWayRule, basically "Go", "Stop", or "Stop, Then Go". A RightOfWayRule may have multiple possible States, in which case its States must have Id's which are unique within the context of that RightOfWayRule.

A State also describes the yield logic of a RightOfWayRule, via a list of Id's of other RightOfWayRules (and thus the zones which they control) which have priority over this rule. An empty list means that a rule in this State has priority over all other rules. Vehicles with lower priority (i.e., traveling on lower-priority paths) must yield to vehicles with higher priority.

Unique identifier for a State

List of RightOfWayRule::Id's of rules/zones with priority.

Basic semantic type of a rule state.

< Vehicle has right-of-way and may proceed if safe to do so.

< Vehicle does not have right-of-way and must stop.

< Vehicle must come to complete stop before entering controlled zone, but may then proceed if safe;

Constructs a State instance.

Parameters
idthe unique Id
typethe semantic Type
yield_tothe other paths/rules which must be yielded to

Returns the Id.

Returns the Type.

Returns the YieldGroup.

Constructs a RightOfWayRule.

Parameters
idthe unique ID of this rule (in the RoadRulebook)
zoneto which this rule applies
zone_typedescribing whether or not stopping within the zone is allowed
statesone or more States, each of which indicate the possible right-of-way semantics for a vehicle traversing the zone
related_bulb_groupsThe related bulb groups. All IDs present within the supplied map are assumed to be valid.
Exceptions
maliput::common::assertion_errorif states is empty or if states contains duplicate State::Id's.
maliput::common::assertion_errorif any duplicate BulbGroup::Id is found.

Returns the rule's identifier.

Returns the zone controlled by the rule.

Returns the zone's type.

Returns the catalog of possible States.

Returns true if the rule is static, i.e., has no dynamic state, otherwise false.

This is true if and only if the rule has a single state.

Returns the static state of the rule.

This is a convenience function for returning a static rule's single state.

Exceptions
maliput::common::assertion_errorif is_static() is false.

Returns the related bulb groups.

◆ MALIPUT_DEPRECATED() [4/4]

class maliput::api::rules::MALIPUT_DEPRECATED ( "RigthOfWayRule class will be deprecated."  )

Abstract interface for the provider of the RightOfWayRule.

Result returned by GetState(const RightOfWayRule::Id).

Gets the state of the RightOfWayRule identified by id.

Returns a RightOfWayResult struct bearing the State::Id of the rule's current state. If a transition to a new state is anticipated, RightOfWayResult::next will be populated and bear the State::Id of the next state. If the time until the transition is known, then RightOfWayResult::next.duration_until will be populated with that duration.

Returns std::nullopt if id is unrecognized, which would be the case if no such rule exists or if the rule has only static semantics.