Represents a speed limit that affects a lanelet. More...
#include <BasicRegulatoryElements.h>
Public Types | |
using | Ptr = std::shared_ptr< SpeedLimit > |
![]() | |
using | Ptr = std::shared_ptr< TrafficSign > |
![]() | |
using | Category = traits::RegulatoryElementTag |
using | const_iterator = RuleParameterMap::const_iterator |
using | ConstType = RegulatoryElement |
using | iterator = RuleParameterMap::iterator |
using | MutableType = GenericRegulatoryElement |
using | ThreeDType = RegulatoryElement |
using | TwoDType = RegulatoryElement |
![]() | |
using | DataType = RegulatoryElementData |
Static Public Member Functions | |
static Ptr | make (Id id, AttributeMap attributes, const std::string &signType, const LineStrings3d &refLines={}, const LineStrings3d &cancelLines={}) |
Create a speed limit regulatory element only from a type or speed limit without actual sign. More... | |
static Ptr | make (Id id, const AttributeMap &attributes, const TrafficSignsWithType &trafficSigns, const TrafficSignsWithType &cancellingTrafficSigns={}, const LineStrings3d &refLines={}, const LineStrings3d &cancelLines={}) |
Create a speed limit regulatory element. Similar to a traffic sign. More... | |
![]() | |
static Ptr | make (Id id, const AttributeMap &attributes, const TrafficSignsWithType &trafficSigns, const TrafficSignsWithType &cancellingTrafficSigns={}, const LineStrings3d &refLines={}, const LineStrings3d &cancelLines={}) |
Create a valid TrafficSign object. More... | |
Static Public Attributes | |
static constexpr char | RuleName [] = "speed_limit" |
![]() | |
static constexpr char | RuleName [] = "traffic_sign" |
![]() | |
static constexpr char | RuleName [] = "basic_regulatory_element" |
![]() | |
static constexpr bool | IsConst |
Friends | |
class | RegisterRegulatoryElement< SpeedLimit > |
Additional Inherited Members | |
![]() | |
void | addCancellingRefLine (const LineString3d &line) |
Add a new line from where the sign becomes inactive. More... | |
void | addCancellingTrafficSign (const TrafficSignsWithType &signs) |
Add new cancelling traffic sign. More... | |
void | addRefLine (const LineString3d &line) |
Add a new reference line. More... | |
void | addTrafficSign (const LineStringOrPolygon3d &sign) |
Adds another traffic sign. More... | |
LineStrings3d | cancelLines () |
ConstLineStrings3d | cancelLines () const |
gets the line(s) from which a sign becomes invalid. More... | |
LineStringsOrPolygons3d | cancellingTrafficSigns () |
ConstLineStringsOrPolygons3d | cancellingTrafficSigns () const |
get list of cancellingTrafficSigns, if existing More... | |
std::vector< std::string > | cancelTypes () const |
Types of the cancelling traffic signs if they exist. More... | |
LineStrings3d | refLines () |
ConstLineStrings3d | refLines () const |
gets the line(s) from which a sign becomes valid. More... | |
bool | removeCancellingRefLine (const LineString3d &line) |
Remove a cancelling line. Returns true on success. More... | |
bool | removeCancellingTrafficSign (const LineStringOrPolygon3d &sign) |
remove a cancelling traffic sign, returns true on success More... | |
bool | removeRefLine (const LineString3d &line) |
Remove a reference line. Returns true on success. More... | |
bool | removeTrafficSign (const LineStringOrPolygon3d &sign) |
remove a traffic sign and returns true on success More... | |
LineStringsOrPolygons3d | trafficSigns () |
ConstLineStringsOrPolygons3d | trafficSigns () const |
returns the traffic signs More... | |
std::string | type () const |
get the id/number of the sign(s) More... | |
![]() | |
void | applyVisitor (RuleParameterVisitor &visitor) const |
applies a visitor to every parameter in the regulatory element More... | |
bool | empty () const |
returns true if this object contains no parameters More... | |
template<typename T > | |
Optional< T > | find (Id id) const |
Finds a parameter by its id, independent of the role. More... | |
template<> | |
Optional< ConstRuleParameter > | find (Id id) const |
template<> | |
boost::optional< ConstLanelet > | find (Id id) const |
template<> | |
boost::optional< ConstArea > | find (Id id) const |
ConstRuleParameterMap | getParameters () const |
Returns all parameters as const object (coversion overhead for const) More... | |
template<typename T > | |
std::vector< T > | getParameters (const std::string &role) const |
Returns a vector of all RuleParameters that could be converted to T. More... | |
template<> | |
std::vector< ConstLanelet > | getParameters (const std::string &role) const |
template<typename T > | |
std::vector< T > | getParameters (RoleName role) const |
template<> | |
std::vector< ConstLanelet > | getParameters (RoleName role) const |
std::vector< std::string > | roles () const |
returns all the roles this regulatory element has More... | |
void | setId (Id id) noexcept |
size_t | size () const |
get the number of roles in this regulatoryElement More... | |
virtual | ~RegulatoryElement () |
![]() | |
const Attribute & | attribute (AttributeName name) const |
retrieve an attribute (enum version) More... | |
const Attribute & | attribute (const std::string &name) const |
retrieve an attribute More... | |
T | attributeOr (AttributeName name, T defaultVal) const |
retrieve an attribute (enum version) More... | |
T | attributeOr (const std::string &name, T defaultVal) const noexcept |
retrieve an attribute (string version) More... | |
const AttributeMap & | attributes () const |
get the attributes of this primitive More... | |
const std::shared_ptr< const RegulatoryElementData > & | constData () const |
get the internal data of this primitive More... | |
ConstPrimitive (const std::shared_ptr< const RegulatoryElementData > &data) | |
Construct from a pointer to the data. More... | |
bool | hasAttribute (AttributeName name) const noexcept |
check for an attribute (enum version) More... | |
bool | hasAttribute (const std::string &name) const noexcept |
check whether this primitive has a specific attribute More... | |
Id | id () const noexcept |
get the unique id of this primitive More... | |
bool | operator!= (const ConstPrimitive &rhs) const |
bool | operator== (const ConstPrimitive &rhs) const |
Represents a speed limit that affects a lanelet.
A 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.
As an alternative, the type can also be specified using the sign_type tag of the regulatory element. However this is not recommended, because will make it hard to track where the speed limit originates.
Definition at line 336 of file BasicRegulatoryElements.h.
using lanelet::SpeedLimit::Ptr = std::shared_ptr<SpeedLimit> |
Definition at line 338 of file BasicRegulatoryElements.h.
|
protected |
Definition at line 328 of file BasicRegulatoryElements.cpp.
|
explicitprotected |
Definition at line 334 of file BasicRegulatoryElements.cpp.
|
inlinestatic |
Create a speed limit regulatory element only from a type or speed limit without actual sign.
Definition at line 349 of file BasicRegulatoryElements.h.
|
inlinestatic |
Create a speed limit regulatory element. Similar to a traffic sign.
Definition at line 342 of file BasicRegulatoryElements.h.
|
friend |
Definition at line 356 of file BasicRegulatoryElements.h.
|
staticconstexpr |
Definition at line 339 of file BasicRegulatoryElements.h.