maliput
|
A concrete implementation of the api::Intersection abstract interface.
#include <include/maliput/base/intersection.h>
Public Member Functions | |
Intersection (const Id &id, const std::vector< api::LaneSRange > ®ion, const api::rules::PhaseRing &ring, ManualPhaseProvider *phase_provider) | |
Constructs an Intersection instance. More... | |
virtual | ~Intersection ()=default |
std::optional< api::rules::PhaseProvider::Result > | Phase () const override |
Returns the current phase. More... | |
void | SetPhase (const api::rules::Phase::Id &phase_id, const std::optional< api::rules::Phase::Id > &next_phase=std::nullopt, const std::optional< double > &duration_until=std::nullopt) override |
Sets the current Phase and optionally the next Phase. More... | |
![]() | |
Intersection (const Id &id, const std::vector< LaneSRange > ®ion, const rules::PhaseRing &ring) | |
Constructs an Intersection instance. More... | |
const Id & | id () const |
Returns the persistent identifier. More... | |
const std::vector< LaneSRange > & | region () const |
Returns the region. See constructor parameter region for more details. More... | |
const rules::PhaseRing::Id & | ring_id () const |
Returns the rules::PhaseRing::Id of the rules::PhaseRing that applies to this intersection. More... | |
const std::optional< rules::BulbStates > | bulb_states () const |
Returns the current bulb states within the intersection. More... | |
const std::optional< rules::DiscreteValueRuleStates > | DiscreteValueRuleStates () const |
Returns the current discrete value rule states within the intersection. More... | |
const std::optional< rules::RuleStates > | RuleStates () const |
Returns the current RightOfWayRule states within the intersection. More... | |
bool | Includes (const rules::TrafficLight::Id &id) const |
Determines whether the rules::TrafficLight::Id is within this Intersection. More... | |
bool | Includes (const rules::DiscreteValueRule::Id &id) const |
Determines whether the rules::DiscreteValueRule::Id is within this Intersection. More... | |
bool | Includes (const rules::RightOfWayRule::Id &id) const |
Determines whether the rules::RightOfWayRule::Id is within this Intersection. More... | |
bool | Includes (const InertialPosition &inertial_position, const RoadGeometry *road_geometry) const |
Determines whether inertial_position is within this Intersection::Region(). More... | |
Additional Inherited Members | |
![]() | |
using | Id = TypeSpecificIdentifier< class Intersection > |
Unique identifier for an Intersection. More... | |
Intersection | ( | const Id & | id, |
const std::vector< api::LaneSRange > & | region, | ||
const api::rules::PhaseRing & | ring, | ||
ManualPhaseProvider * | phase_provider | ||
) |
Constructs an Intersection instance.
id | The intersection's unique ID. |
region | The region of the road network that is part of the intersection. |
ring | The PhaseRing that defines the phases within the intersection. |
phase_provider | Enables the current phase within an api::rules::PhaseRing with ID ring_id to be specified and obtained. The pointer must remain valid throughout this class instance's lifetime. |
|
virtualdefault |
Reimplemented from Intersection.
|
overridevirtual |
Returns the current phase.
Implements Intersection.
|
overridevirtual |
Sets the current Phase and optionally the next Phase.
std::exception | if duration_until is defined when next_phase is undefined. |
Implements Intersection.