![]() |
Classes | |
class | lanelet::AllWayStop |
Defines an all way stop. These are a special form of right of way, where all lanelets have to yield, depending on the order of arrival and the route through the intersection.The distance to the intersection is represented either by the distance to the stop line, if present, otherwise the distance to the end of the lanelet. More... | |
class | lanelet::GenericRegulatoryElement |
A GenericRegulatoryElement can hold any parameters. More... | |
class | lanelet::RegulatoryElement |
A general rule or limitation for a lanelet (abstract base class) More... | |
class | lanelet::RightOfWay |
Defines right of way restrictions. More... | |
class | lanelet::SpeedLimit |
Represents a speed limit that affects a laneletA speed limit is defined by one ore more traffic signs and cancelled by one or more traffic signs. All lanelets affected by this refer to this traffic sign. More... | |
class | lanelet::TrafficLight |
Represents a traffic light restriction on the lanelet. More... | |
class | lanelet::TrafficSign |
Expresses a generic traffic sign rule. More... | |
Regulatory Elements define any kind of traffic rule that affects a Lanelet or an Area. Traffic rules are usually composed by the thing that defined the rule (usually a traffic sign), and other things that are relevant for the rule, e.g. a StopLine. These things are called RuleParameter.
Every regulatoryElement has a number of RuleParameters that are implemented as boost::variants. A RuleParameter can be any lanelet primitive. For techical reasons (to avoid cyclic shared_ptr issues), Area and Lanelet is stored using WeakPtrs. If Lanelets go out of scope, this weak ptr will become invalid. Usually this will not be an issue because LaneletMap still holds the Lanelets.
RegulatoryElements are the only primitives that should be referenced by a shared_ptr because they make use of dynamic inheritance.
For faster access, roles can be queried using the RoleName enum (this works similarly to Attribute). Instead of a std::map lookup, this is only a std::vector operation.
All RegulatoryElements inherit from a common, abstract, immutable base class: The RegulatoryElement. New regulatory elements can be added by inhering from it, implementing whatever needs to be implemented and registering it with the RegulatoryElementFactory. Concrete RegulatoryElements are identified by their subtype attribute.
For corner cases, a GenericRegulatoryElement is offered which is mutable and can be used to model any yet unknown traffic rule. Traffic rules should be interpreted by extending the lanele2_traffic_rules package, preferably for all countries that have this rule.