RightOfWayRule::State Class Referencefinal

Semantic state of a RightOfWayRule. More...

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

Public Types

enum  Type { kGo = 0, kStop, kStopThenGo }
 Basic semantic type of a rule state. More...
using Id = TypeSpecificIdentifier< class State >
 Unique identifier for a State. More...
using YieldGroup = std::vector< RightOfWayRule::Id >
 List of RightOfWayRule::Id's of rules/zones with priority. More...

Public Member Functions

 State (Id id, Type type, const YieldGroup &yield_to)
 Constructs a State instance. More...
const Idid () const
 Returns the Id. More...
Type type () const
 Returns the Type. More...
const YieldGroupyield_to () const
 Returns the YieldGroup. More...
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 State (const State &)=default
Stateoperator= (const State &)=default
 State (State &&)=default
Stateoperator= (State &&)=default

Detailed Description

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.

Member Typedef Documentation

Unique identifier for a State.

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

Member Enumeration Documentation

enum Type

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;.

Constructor & Destructor Documentation

State ( const State )
State ( State &&  )
State ( Id  id,
Type  type,
const YieldGroup yield_to 

Constructs a State instance.

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

Member Function Documentation

const Id& id ( ) const

Returns the Id.

Here is the caller graph for this function:

State& operator= ( State &&  )
State& operator= ( const State )
Type type ( ) const

Returns the Type.

Here is the caller graph for this function:

const YieldGroup& yield_to ( ) const

Returns the YieldGroup.

Here is the caller graph for this function:

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