Class RightOfWay

Inheritance Relationships

Base Type

Class Documentation

class RightOfWay : public lanelet::RegulatoryElement

Defines right of way restrictions.

Public Types

using Ptr = std::shared_ptr<RightOfWay>

Public Functions

ManeuverType getManeuver(const ConstLanelet &lanelet) const

returns whether a lanelet has to yield or has right of way

ConstLanelets rightOfWayLanelets() const

get the lanelets have right of way

Lanelets rightOfWayLanelets()
ConstLanelets yieldLanelets() const

get the lanelets that have to yield

Lanelets yieldLanelets()
Optional<ConstLineString3d> stopLine() const

get the stop line for the yield lanelets, if present

Optional<LineString3d> stopLine()
void setStopLine(const LineString3d &stopLine)

Overwrites the stop line.

void addRightOfWayLanelet(const Lanelet &lanelet)

Adds a lanelet for RightOfWay.

void addYieldLanelet(const Lanelet &lanelet)

Add yielding lanelet.

bool removeRightOfWayLanelet(const Lanelet &lanelet)

Removes a right of way lanelet and returns true on success.

bool removeYieldLanelet(const Lanelet &lanelet)

Removes a yielding lanelet and returns true no success.

void removeStopLine()

Removes the stop line.

Public Static Functions

static inline Ptr make(Id id, const AttributeMap &attributes, const Lanelets &rightOfWay, const Lanelets &yield, const Optional<LineString3d> &stopLine = {})

Create a valid Right of Way object.

Parameters:
  • id – id for this rule

  • attributes – for this rule. Might be extended if necessary

  • rightOfWay – the lanelets that have right of way

  • yield – the lanelets that have to yield

  • stopLine – line where to stop. If there is none, stop at the end of the lanelet.

Public Static Attributes

static constexpr char RuleName[] = "right_of_way"

Protected Functions

RightOfWay(Id id, const AttributeMap &attributes, const Lanelets &rightOfWay, const Lanelets &yield, const Optional<LineString3d> &stopLine = {})
explicit RightOfWay(const RegulatoryElementDataPtr &data)

Friends

friend class RegisterRegulatoryElement< RightOfWay >