Class for inferring traffic rules for lanelets and areas. More...
#include <TrafficRules.h>

Public Types | |
| using | Configuration = std::map< std::string, Attribute > |
Public Member Functions | |
| virtual bool | canChangeLane (const ConstLanelet &from, const ConstLanelet &to) const =0 |
| determines if a lane change can be made between two lanelets More... | |
| virtual bool | canPass (const ConstArea &area) const =0 |
| returns whether it is allowed to pass/drive on this area More... | |
| virtual bool | canPass (const ConstArea &from, const ConstArea &to) const =0 |
| virtual bool | canPass (const ConstArea &from, const ConstLanelet &to) const =0 |
| virtual bool | canPass (const ConstLanelet &from, const ConstArea &to) const =0 |
| virtual bool | canPass (const ConstLanelet &from, const ConstLanelet &to) const =0 |
| returns whether it is allowed to pass/drive from a lanelet to another lanelet. More... | |
| virtual bool | canPass (const ConstLanelet &lanelet) const =0 |
| returns whether it is allowed to pass/drive on this lanelet More... | |
| const Configuration & | configuration () const |
| configuration for this traffic rules object More... | |
| virtual bool | hasDynamicRules (const ConstLanelet &lanelet) const =0 |
| returns whether dynamic traffic rules apply to this lanelet. More... | |
| virtual bool | isOneWay (const ConstLanelet &lanelet) const =0 |
| returns whether a lanelet can be driven in one direction only More... | |
| const std::string & | location () const |
| the the location the rules are valid for More... | |
| const std::string & | participant () const |
| the traffic participant the rules are valid for (e.g. vehicle, car, pedestrian, etc) More... | |
| virtual SpeedLimitInformation | speedLimit (const ConstArea &area) const =0 |
| returns speed limit on this area. More... | |
| virtual SpeedLimitInformation | speedLimit (const ConstLanelet &lanelet) const =0 |
| returns speed limit on this lanelet. More... | |
| TrafficRules (Configuration config=Configuration()) | |
| Constructor. More... | |
| virtual | ~TrafficRules () |
Private Attributes | |
| Configuration | config_ |
Class for inferring traffic rules for lanelets and areas.
Definition at line 18 of file TrafficRules.h.
| using lanelet::traffic_rules::TrafficRules::Configuration = std::map<std::string, Attribute> |
Definition at line 20 of file TrafficRules.h.
|
inlineexplicit |
Constructor.
| config | a configuration for traffic rules. This can be necessary for very specialized rule objects (ie considering the time of day or the weather). The config must have at least two entries: participant and location. |
Definition at line 28 of file TrafficRules.h.
|
virtualdefault |
|
pure virtual |
determines if a lane change can be made between two lanelets
The orientation of the lanelets is important here as well.
Implemented in lanelet::traffic_rules::GenericTrafficRules.
|
pure virtual |
returns whether it is allowed to pass/drive on this area
Implemented in lanelet::traffic_rules::GenericTrafficRules, and lanelet::traffic_rules::GermanVehicle.
|
pure virtual |
Implemented in lanelet::traffic_rules::GenericTrafficRules.
|
pure virtual |
Implemented in lanelet::traffic_rules::GenericTrafficRules.
|
pure virtual |
Implemented in lanelet::traffic_rules::GenericTrafficRules.
|
pure virtual |
returns whether it is allowed to pass/drive from a lanelet to another lanelet.
The orientation of the lanelets is important. The function first checks if lanelets are direcly adjacent, then checks if both lanelets are passable and finally checks if any traffic rule prevents to pass between the lanelets.
Implemented in lanelet::traffic_rules::GenericTrafficRules.
|
pure virtual |
returns whether it is allowed to pass/drive on this lanelet
The result can differ by the type of the traffic participant. A sidewalk lanelet is passable for a pedestrian but not for a vehicle. Orientation is important. It is not possible to pass an inverted oneWay Lanelet.
Implemented in lanelet::traffic_rules::GenericTrafficRules.
|
inline |
configuration for this traffic rules object
Definition at line 86 of file TrafficRules.h.
|
pure virtual |
returns whether dynamic traffic rules apply to this lanelet.
This can be a case if e.g. a speed limit is controlled by digital signs. If this returns true, additional handling must be done to find which rules are dynamic and how to handle them. This makes the values returned by the other functions unreliable. Handling of dynamic rules is not covered here.
Implemented in lanelet::traffic_rules::GenericTrafficRules.
|
pure virtual |
returns whether a lanelet can be driven in one direction only
Implemented in lanelet::traffic_rules::GenericTrafficRules.
| const std::string & TrafficRules::location | ( | ) | const |
the the location the rules are valid for
Should be ISO country code
Definition at line 325 of file GenericTrafficRules.cpp.
| const std::string & TrafficRules::participant | ( | ) | const |
the traffic participant the rules are valid for (e.g. vehicle, car, pedestrian, etc)
Definition at line 323 of file GenericTrafficRules.cpp.
|
pure virtual |
returns speed limit on this area.
Implemented in lanelet::traffic_rules::GenericTrafficRules.
|
pure virtual |
returns speed limit on this lanelet.
Implemented in lanelet::traffic_rules::GenericTrafficRules.
|
private |
Definition at line 102 of file TrafficRules.h.