maliput
|
Namespaces | |
test | |
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 | |
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::DefaultHash > | BulbColorMapper () |
Maps BulbColor enums to string representations. More... | |
std::unordered_map< BulbType, const char *, maliput::common::DefaultHash > | BulbTypeMapper () |
Maps BulbType enums to string representations. More... | |
std::unordered_map< BulbState, const char *, maliput::common::DefaultHash > | BulbStateMapper () |
Maps BulbState enums to string representations. More... | |
using BulbStates = std::unordered_map<UniqueBulbId, BulbState> |
A mapping from a UniqueBulbId to a BulbState.
Just an alias for user convenience.
using deprecated = std::unordered_map<RightOfWayRule::Id, RightOfWayRule::State::Id> |
using DiscreteValueRuleStates = std::unordered_map<Rule::Id, DiscreteValueRule::DiscreteValue> |
A mapping from a Rule::Id to a DiscreteValueRule::DiscreteValue.
Just an alias for user convenience.
using DiscreteValueRuleTypeAndValues = std::pair<Rule::TypeId, std::vector<DiscreteValueRule::DiscreteValue> > |
Convenient alias for clients that define DiscreteValueRule types.
using RangeValueRuleTypeAndValues = std::pair<Rule::TypeId, std::vector<RangeValueRule::Range> > |
Convenient alias for clients that define RangeValueRule types.
|
strong |
|
strong |
|
strong |
std::unordered_map< BulbColor, const char *, maliput::common::DefaultHash > BulbColorMapper | ( | ) |
Maps BulbColor enums to string representations.
std::unordered_map< BulbState, const char *, maliput::common::DefaultHash > BulbStateMapper | ( | ) |
Maps BulbState enums to string representations.
std::unordered_map< BulbType, const char *, maliput::common::DefaultHash > BulbTypeMapper | ( | ) |
Maps BulbType enums to string representations.
|
final |
Rule describing direction usage for a road lane.
DirectionUsageRules are comprised of:
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.
id | the unique Id |
type | the semantic Type |
severity | the Severity of the State |
Returns the Id.
Returns the Type.
Returns the Severity.
Constructs a DirectionUsageRule.
id | the unique ID of this rule (in the RoadRulebook) |
zone | LaneSRange to which this rule applies |
states | a vector of valid states for the rule |
maliput::common::assertion_error | if 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.
maliput::common::assertion_error | if is_static() is false. |
Maps DirectionUsageRule::State::Type enums to string representations.
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.
id | the unique ID of this rule (in the RoadRulebook) |
zone | LaneSRange to which this rule applies |
severity | Severity of the rule |
min | minimum speed |
max | maximum 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.
|
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:
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.
id | the unique Id |
type | the semantic Type |
yield_to | the other paths/rules which must be yielded to |
Returns the Id.
Returns the Type.
Returns the YieldGroup.
Constructs a RightOfWayRule.
id | the unique ID of this rule (in the RoadRulebook) |
zone | to which this rule applies |
zone_type | describing whether or not stopping within the zone is allowed |
states | one or more States, each of which indicate the possible right-of-way semantics for a vehicle traversing the zone |
related_bulb_groups | The related bulb groups. All IDs present within the supplied map are assumed to be valid. |
maliput::common::assertion_error | if states is empty or if states contains duplicate State::Id's. |
maliput::common::assertion_error | if 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.
maliput::common::assertion_error | if is_static() is false. |
Returns the related bulb groups.
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.