RoutingGraphBuilder.cpp
Go to the documentation of this file.
2 
4 #include <lanelet2_core/geometry/Area.h>
5 #include <lanelet2_core/geometry/Lanelet.h>
6 
7 #include <unordered_map>
8 
12 
13 namespace lanelet {
14 namespace routing {
15 namespace internal {
16 namespace {
17 inline IdPair orderedIdPair(const Id id1, const Id id2) { return (id1 < id2) ? IdPair(id1, id2) : IdPair(id2, id1); }
18 } // namespace
19 
22  struct LaneChangeInfo {
24  bool visited;
25  };
26  using LaneChangeMap = std::unordered_map<ConstLanelet, LaneChangeInfo>;
27 
28  public:
29  using LaneChangeLanelets = std::pair<ConstLanelets, ConstLanelets>;
30 
31  LaneChangeLaneletsCollector() = default;
32  void add(ConstLanelet from, ConstLanelet to) {
33  laneChanges_.emplace(std::move(from), LaneChangeInfo{std::move(to), false});
34  currPos_ = laneChanges_.begin();
35  }
36 
37  template <typename Func1, typename Func2>
39  for (; currPos_ != laneChanges_.end() && currPos_->second.visited; ++currPos_) {
40  }
41  if (currPos_ == laneChanges_.end()) {
42  return {};
43  }
44  return getLaneChangeLanelets(currPos_, std::forward<Func1>(prev), std::forward<Func2>(next));
45  }
46 
47  private:
48  template <typename Func1, typename Func2>
49  LaneChangeLanelets getLaneChangeLanelets(LaneChangeMap::iterator iter, Func1&& prev, Func2&& next) {
50  iter->second.visited = true;
51  auto followers = getAdjacentLaneChangeLanelets(iter, std::forward<Func2>(next));
52  auto predecessors = getAdjacentLaneChangeLanelets(iter, std::forward<Func1>(prev));
53  std::reverse(predecessors.first.begin(), predecessors.first.end());
54  std::reverse(predecessors.second.begin(), predecessors.second.end());
55  std::pair<ConstLanelets, ConstLanelets> result;
56  result.first = utils::concatenate({predecessors.first, ConstLanelets{iter->first}, followers.first});
57  result.second = utils::concatenate({predecessors.second, ConstLanelets{iter->second.target}, followers.second});
58  return result;
59  }
60 
61  template <typename Func1>
62  LaneChangeLanelets getAdjacentLaneChangeLanelets(LaneChangeMap::iterator iter, Func1&& adjacent) {
63  std::pair<ConstLanelets, ConstLanelets> successors;
64  while (true) {
65  auto nextSourceLlts = adjacent(iter->first);
66  auto nextTargetLlts = adjacent(iter->second.target);
67  if (nextSourceLlts.size() != 1 || nextTargetLlts.size() != 1) {
68  break;
69  }
70  ConstLanelet& nextSourceLlt = nextSourceLlts.front();
71  ConstLanelet& nextTargetLlt = nextTargetLlts.front();
72  iter = laneChanges_.find(nextSourceLlt);
73  if (iter == laneChanges_.end() || iter->second.visited || iter->second.target != nextTargetLlt) {
74  break;
75  }
76  iter->second.visited = true;
77  successors.first.push_back(nextSourceLlt);
78  successors.second.push_back(nextTargetLlt);
79  }
80  return successors;
81  }
82 
84  LaneChangeMap::iterator currPos_{laneChanges_.end()};
85 };
86 
88  const RoutingCostPtrs& routingCosts, const RoutingGraph::Configuration& config)
89  : graph_{std::make_unique<RoutingGraphGraph>(routingCosts.size())},
90  trafficRules_{trafficRules},
91  routingCosts_{routingCosts},
92  config_{config} {}
93 
95  auto passableLanelets = getPassableLanelets(laneletMapLayers.laneletLayer, trafficRules_);
96  auto passableAreas = getPassableAreas(laneletMapLayers.areaLayer, trafficRules_);
97  auto passableMap = utils::createConstSubmap(passableLanelets, passableAreas);
98  appendBidirectionalLanelets(passableLanelets);
99  addLaneletsToGraph(passableLanelets);
100  addAreasToGraph(passableAreas);
101  addEdges(passableLanelets, passableMap->laneletLayer);
102  addEdges(passableAreas, passableMap->laneletLayer, passableMap->areaLayer);
103  return std::make_unique<RoutingGraph>(std::move(graph_), std::move(passableMap));
104 }
105 
107  const traffic_rules::TrafficRules& trafficRules) {
108  ConstLanelets llts;
109  llts.reserve(lanelets.size());
110  std::copy_if(lanelets.begin(), lanelets.end(), std::back_inserter(llts),
111  [&trafficRules](const ConstLanelet& llt) { return trafficRules.canPass(llt); });
112  return llts;
113 }
114 
116  const traffic_rules::TrafficRules& trafficRules) {
117  ConstAreas ars;
118  ars.reserve(areas.size());
119  std::copy_if(areas.begin(), areas.end(), std::back_inserter(ars),
120  [&trafficRules](const ConstArea& area) { return trafficRules.canPass(area); });
121  return ars;
122 }
123 
125  std::deque<ConstLanelet> invLanelets;
126  for (auto& ll : llts) {
127  if (trafficRules_.canPass(ll.invert())) {
128  invLanelets.push_back(ll.invert());
129  bothWaysLaneletIds_.emplace(ll.id());
130  }
131  }
132  llts.insert(llts.end(), invLanelets.begin(), invLanelets.end());
133 }
134 
136  for (auto& ll : llts) {
137  graph_->addVertex(VertexInfo{ll});
139  }
140 }
141 
143  for (auto& ar : areas) {
144  graph_->addVertex(VertexInfo{ar});
145  }
146 }
147 
148 void RoutingGraphBuilder::addEdges(const ConstLanelets& lanelets, const LaneletLayer& passableLanelets) {
149  LaneChangeLaneletsCollector leftToRight;
150  LaneChangeLaneletsCollector rightToLeft;
151  // Check relations between lanelets
152  for (auto const& ll : lanelets) {
154  addSidewayEdge(rightToLeft, ll, ll.leftBound(), RelationType::AdjacentLeft);
155  addSidewayEdge(leftToRight, ll, ll.rightBound(), RelationType::AdjacentRight);
156  addConflictingEdge(ll, passableLanelets);
157  }
158 
159  // now process the lane changes
162 }
163 
164 void RoutingGraphBuilder::addEdges(const ConstAreas& areas, const LaneletLayer& passableLanelets,
165  const AreaLayer& passableAreas) {
166  for (const auto& area : areas) {
167  addAreaEdge(area, passableLanelets);
168  addAreaEdge(area, passableAreas);
169  }
170 }
171 
173  auto endPointsLanelets =
174  pointsToLanelets_.equal_range(orderedIdPair(ll.leftBound().back().id(), ll.rightBound().back().id()));
175  // Following
176  ConstLanelets following;
177  std::for_each(endPointsLanelets.first, endPointsLanelets.second, [&ll, this, &following](auto it) {
178  if (geometry::follows(ll, it.second) && this->trafficRules_.canPass(ll, it.second)) {
179  following.push_back(it.second);
180  }
181  });
182  if (following.empty()) {
183  return;
184  }
185  // find out if there are several previous merging lanelets
186  ConstLanelets merging;
187  std::for_each(endPointsLanelets.first, endPointsLanelets.second, [&following, this, &merging](auto it) {
188  if (geometry::follows(it.second, following.front()) && this->trafficRules_.canPass(it.second, following.front())) {
189  merging.push_back(it.second);
190  }
191  });
193  for (auto& followingIt : following) {
194  assignCosts(ll, followingIt, relation);
195  }
196 }
197 
198 void RoutingGraphBuilder::addSidewayEdge(LaneChangeLaneletsCollector& laneChangeLanelets, const ConstLanelet& ll,
199  const ConstLineString3d& bound, const RelationType& relation) {
200  auto directlySideway = [&relation, &ll](const ConstLanelet& sideLl) {
201  return relation == RelationType::AdjacentLeft ? geometry::leftOf(sideLl, ll) : geometry::rightOf(sideLl, ll);
202  };
203  auto sideOf = pointsToLanelets_.equal_range(orderedIdPair(bound.front().id(), bound.back().id()));
204  for (auto it = sideOf.first; it != sideOf.second; ++it) {
205  if (ll != it->second && !hasEdge(ll, it->second) && directlySideway(it->second)) {
206  if (trafficRules_.canChangeLane(ll, it->second)) {
207  // we process lane changes later, when we know all lanelets that can participate in lane change
208  laneChangeLanelets.add(ll, it->second);
209  } else {
210  assignCosts(ll, it->second, relation);
211  }
212  }
213  }
214 }
215 
216 void RoutingGraphBuilder::addConflictingEdge(const ConstLanelet& ll, const LaneletLayer& passableLanelets) {
217  // Conflicting
218  ConstLanelets results = passableLanelets.search(geometry::boundingBox2d(ll));
220  for (auto& result : results) {
221  if (bothWaysLaneletIds_.find(ll.id()) != bothWaysLaneletIds_.end() && result == ll) {
222  other = result.invert();
223  assignCosts(ll, other, RelationType::Conflicting);
224  assignCosts(other, ll, RelationType::Conflicting);
225  continue;
226  }
227  other = result;
228  if (hasEdge(ll, result)) {
229  continue;
230  }
231  auto vertex = graph_->getVertex(other);
232  if (!vertex || result == ll) {
233  continue;
234  }
235  auto maxHeight = participantHeight();
236  if ((maxHeight && geometry::overlaps3d(ll, other, *maxHeight)) || (!maxHeight && geometry::overlaps2d(ll, other))) {
237  assignCosts(ll, other, RelationType::Conflicting);
238  assignCosts(other, ll, RelationType::Conflicting);
239  }
240  }
241 }
242 
243 void RoutingGraphBuilder::addLaneChangeEdges(LaneChangeLaneletsCollector& laneChanges, const RelationType& relation) {
244  auto getSuccessors = [this](auto beginEdgeIt, auto endEdgeIt, auto getVertex) {
245  ConstLanelets nexts;
246  for (; beginEdgeIt != endEdgeIt; ++beginEdgeIt) {
247  auto& edgeInfo = graph_->get()[*beginEdgeIt];
248  if (edgeInfo.relation == RelationType::Successor && edgeInfo.costId == 0) {
249  nexts.push_back(graph_->get()[getVertex(*beginEdgeIt, graph_->get())].lanelet());
250  }
251  }
252  return nexts;
253  };
254  auto next = [this, &getSuccessors](const ConstLanelet& llt) {
255  auto edges = boost::out_edges(*graph_->getVertex(llt), graph_->get());
256  return getSuccessors(edges.first, edges.second, [](auto edge, const auto& g) { return boost::target(edge, g); });
257  };
258  auto prev = [this, &getSuccessors](const ConstLanelet& llt) {
259  auto edges = boost::in_edges(*graph_->getVertex(llt), graph_->get());
260  return getSuccessors(edges.first, edges.second, [](auto edge, const auto& g) { return boost::source(edge, g); });
261  };
263  while (!!(laneChangeLanelets = laneChanges.getNextChangeLanelets(prev, next))) {
264  assignLaneChangeCosts(std::move(laneChangeLanelets->first), std::move(laneChangeLanelets->second), relation);
265  }
266 }
267 
268 void RoutingGraphBuilder::addAreaEdge(const ConstArea& area, const LaneletLayer& passableLanelets) {
269  auto candidates = passableLanelets.search(geometry::boundingBox2d(area));
270  for (auto& candidate : candidates) {
271  bool canPass = false;
272  if (trafficRules_.canPass(area, candidate)) {
273  canPass = true;
274  assignCosts(area, candidate, RelationType::Area);
275  }
276  if (trafficRules_.canPass(area, candidate.invert())) {
277  canPass = true;
278  assignCosts(area, candidate.invert(), RelationType::Area);
279  }
280  if (trafficRules_.canPass(candidate, area)) {
281  canPass = true;
282  assignCosts(candidate, area, RelationType::Area);
283  }
284  if (trafficRules_.canPass(candidate.invert(), area)) {
285  canPass = true;
286  assignCosts(candidate.invert(), area, RelationType::Area);
287  }
288  if (canPass) {
289  continue;
290  }
291  auto maxHeight = participantHeight();
292  if ((maxHeight && geometry::overlaps3d(area, candidate, *maxHeight)) ||
293  (!maxHeight && geometry::overlaps2d(area, candidate))) {
294  assignCosts(candidate, area, RelationType::Conflicting);
295  }
296  }
297 }
298 
299 void RoutingGraphBuilder::addAreaEdge(const ConstArea& area, const AreaLayer& passableAreas) {
300  auto candidates = passableAreas.search(geometry::boundingBox2d(area));
301  for (auto& candidate : candidates) {
302  if (candidate == area) {
303  continue;
304  }
305  if (trafficRules_.canPass(area, candidate)) {
306  assignCosts(area, candidate, RelationType::Area);
307  continue;
308  }
309  auto maxHeight = participantHeight();
310  if ((maxHeight && geometry::overlaps3d(ConstArea(area), candidate, *maxHeight)) ||
311  (!maxHeight && geometry::overlaps2d(ConstArea(area), candidate))) {
312  assignCosts(candidate, area, RelationType::Conflicting);
313  }
314  }
315 }
316 
317 Optional<double> RoutingGraphBuilder::participantHeight() const {
318  auto height = config_.find(RoutingGraph::ParticipantHeight);
319  if (height != config_.end()) {
320  return height->second.asDouble();
321  }
322  return {};
323 }
324 
325 void RoutingGraphBuilder::addPointsToSearchIndex(const ConstLanelet& ll) {
326  using PointLaneletPair = std::pair<IdPair, ConstLanelet>;
327  pointsToLanelets_.insert(
328  PointLaneletPair(orderedIdPair(ll.leftBound().front().id(), ll.rightBound().front().id()), ll));
329  pointsToLanelets_.insert(
330  PointLaneletPair(orderedIdPair(ll.leftBound().back().id(), ll.rightBound().back().id()), ll));
331  pointsToLanelets_.insert(
332  PointLaneletPair(orderedIdPair(ll.leftBound().front().id(), ll.leftBound().back().id()), ll));
333  pointsToLanelets_.insert(
334  PointLaneletPair(orderedIdPair(ll.rightBound().front().id(), ll.rightBound().back().id()), ll));
335 }
336 
337 bool RoutingGraphBuilder::hasEdge(const ConstLanelet& from, const ConstLanelet& to) {
338  return !!graph_->getEdgeInfo(from, to);
339 }
340 
341 void RoutingGraphBuilder::assignLaneChangeCosts(ConstLanelets froms, ConstLanelets tos, const RelationType& relation) {
342  assert(relation == RelationType::Left || relation == RelationType::Right);
343  assert(froms.size() == tos.size());
344  for (; !froms.empty(); froms.erase(froms.begin()), tos.erase(tos.begin())) {
345  for (RoutingCostId costId = 0; costId < RoutingCostId(routingCosts_.size()); ++costId) {
346  auto cost = routingCosts_[costId]->getCostLaneChange(trafficRules_, froms, tos);
347  if (!std::isfinite(cost)) {
348  // if the costs are infinite, we add an adjacent edge instead
349  auto adjacent = relation == RelationType::Left ? RelationType::AdjacentLeft : RelationType::AdjacentRight;
350  graph_->addEdge(froms.front(), tos.front(), EdgeInfo{1, costId, adjacent});
351  continue;
352  }
353  graph_->addEdge(froms.front(), tos.front(), EdgeInfo{cost, costId, relation});
354  }
355  }
356 }
357 
358 void RoutingGraphBuilder::assignCosts(const ConstLaneletOrArea& from, const ConstLaneletOrArea& to,
359  const RelationType& relation) {
360  for (RoutingCostId rci = 0; rci < RoutingCostId(routingCosts_.size()); rci++) {
361  EdgeInfo edgeInfo{};
362  edgeInfo.costId = rci;
363  edgeInfo.relation = relation;
364  auto& routingCost = *routingCosts_[rci];
365  if (relation == RelationType::Successor || relation == RelationType::Area) {
366  edgeInfo.routingCost = routingCost.getCostSucceeding(trafficRules_, from, to);
367  } else if (relation == RelationType::Left || relation == RelationType::Right) {
368  edgeInfo.routingCost = routingCost.getCostLaneChange(trafficRules_, {*from.lanelet()}, {*to.lanelet()});
369  } else if (relation == RelationType::AdjacentLeft || relation == RelationType::AdjacentRight ||
370  relation == RelationType::Conflicting) {
371  edgeInfo.routingCost = 1;
372  } else {
373  assert(false && "Trying to add edge with wrong relation type to graph."); // NOLINT
374  return;
375  }
376  graph_->addEdge(from, to, edgeInfo);
377  }
378 }
379 } // namespace internal
380 } // namespace routing
381 } // namespace lanelet
lanelet::LaneletMapLayers::laneletLayer
LaneletLayer laneletLayer
lanelet::utils::createConstSubmap
LaneletSubmapConstUPtr createConstSubmap(const ConstLanelets &fromLanelets, const ConstAreas &fromAreas)
lanelet::routing::internal::RoutingGraphBuilder::addPointsToSearchIndex
void addPointsToSearchIndex(const ConstLanelet &ll)
Adds the first and last points of a lanelet to the search index.
Definition: RoutingGraphBuilder.cpp:325
PrimitiveLayer< Lanelet >::begin
iterator begin()
lanelet::routing::internal::LaneChangeLaneletsCollector::LaneChangeLaneletsCollector
LaneChangeLaneletsCollector()=default
RoutingGraph.h
lanelet::routing::internal::LaneChangeLaneletsCollector::LaneChangeMap
std::unordered_map< ConstLanelet, LaneChangeInfo > LaneChangeMap
Definition: RoutingGraphBuilder.cpp:26
LaneletMap.h
lanelet::LaneletMapLayers::areaLayer
AreaLayer areaLayer
lanelet
lanelet::utils::concatenate
auto concatenate(ContainerT &&c)
lanelet::routing::internal::RoutingGraphBuilder::RoutingGraphBuilder
RoutingGraphBuilder(const traffic_rules::TrafficRules &trafficRules, const RoutingCostPtrs &routingCosts, const RoutingGraph::Configuration &config)
Definition: RoutingGraphBuilder.cpp:87
lanelet::traffic_rules::TrafficRules
lanelet::routing::RoutingCostPtrs
std::vector< RoutingCostPtr > RoutingCostPtrs
Definition: Forward.h:43
lanelet::ConstArea
next
Optional< ConstLaneletOrArea > next
Definition: LaneletPath.cpp:83
lanelet::routing::internal::RoutingGraphBuilder::addSidewayEdge
void addSidewayEdge(LaneChangeLaneletsCollector &laneChangeLanelets, const ConstLanelet &ll, const ConstLineString3d &bound, const RelationType &relation)
Definition: RoutingGraphBuilder.cpp:198
lanelet::routing::internal::RoutingGraphBuilder::addEdges
void addEdges(const ConstLanelets &lanelets, const LaneletLayer &passableLanelets)
Definition: RoutingGraphBuilder.cpp:148
lanelet::routing::internal::RoutingGraphBuilder::getPassableLanelets
static ConstLanelets getPassableLanelets(const LaneletLayer &lanelets, const traffic_rules::TrafficRules &trafficRules)
Definition: RoutingGraphBuilder.cpp:106
lanelet::routing::internal::RoutingGraphBuilder::addFollowingEdges
void addFollowingEdges(const ConstLanelet &ll)
Definition: RoutingGraphBuilder.cpp:172
lanelet::ConstLaneletOrArea
lanelet::routing::internal::RoutingGraphBuilder::pointsToLanelets_
PointsLaneletMap pointsToLanelets_
A map of tuples (first or last left and right boundary points) to lanelets.
Definition: RoutingGraphBuilder.h:57
lanelet::routing::internal::RoutingGraphBuilder::addConflictingEdge
void addConflictingEdge(const ConstLanelet &ll, const LaneletLayer &passableLanelets)
Definition: RoutingGraphBuilder.cpp:216
Id
int64_t Id
lanelet::routing::RelationType
RelationType
Definition: Forward.h:56
lanelet::routing::internal::LaneChangeLaneletsCollector::currPos_
LaneChangeMap::iterator currPos_
Definition: RoutingGraphBuilder.cpp:84
RoutingGraphBuilder.h
ConstLineStringImpl< Point3d >::back
const ConstPointType & back() const noexcept
lanelet::routing::internal::LaneChangeLaneletsCollector::getNextChangeLanelets
Optional< LaneChangeLanelets > getNextChangeLanelets(Func1 &&prev, Func2 &&next)
Definition: RoutingGraphBuilder.cpp:38
lanelet::routing::internal::LaneChangeLaneletsCollector::getAdjacentLaneChangeLanelets
LaneChangeLanelets getAdjacentLaneChangeLanelets(LaneChangeMap::iterator iter, Func1 &&adjacent)
Definition: RoutingGraphBuilder.cpp:62
lanelet::routing::RelationType::Successor
@ Successor
A (the only) direct, reachable successor. Not merging and not diverging.
lanelet::routing::internal::RoutingGraphBuilder::getPassableAreas
static ConstAreas getPassableAreas(const AreaLayer &areas, const traffic_rules::TrafficRules &trafficRules)
Definition: RoutingGraphBuilder.cpp:115
lanelet::routing::internal::EdgeInfo::costId
RoutingCostId costId
ID of the routing cost module that was used to calculate cost.
Definition: Graph.h:38
lanelet::routing::internal::RoutingGraphBuilder::build
RoutingGraphUPtr build(const LaneletMapLayers &laneletMapLayers)
Definition: RoutingGraphBuilder.cpp:94
lanelet::routing::internal::RoutingGraphBuilder::addLaneChangeEdges
void addLaneChangeEdges(LaneChangeLaneletsCollector &laneChanges, const RelationType &relation)
Definition: RoutingGraphBuilder.cpp:243
lanelet::routing::internal::IdPair
std::pair< Id, Id > IdPair
Definition: Forward.h:14
lanelet::Optional
boost::optional< T > Optional
lanelet::routing::internal::RoutingGraphBuilder::addAreaEdge
void addAreaEdge(const ConstArea &area, const LaneletLayer &passableLanelets)
Definition: RoutingGraphBuilder.cpp:268
other
LaneletAdjacency other
Definition: LaneletPath.cpp:89
lanelet::routing::internal::LaneChangeLaneletsCollector
This class collects lane changable lanelets and combines them to a sequence of adjacent lanechangable...
Definition: RoutingGraphBuilder.cpp:21
lanelet::routing::internal::RoutingGraphBuilder::appendBidirectionalLanelets
void appendBidirectionalLanelets(ConstLanelets &llts)
Definition: RoutingGraphBuilder.cpp:124
lanelet::routing::RoutingGraphUPtr
std::unique_ptr< RoutingGraph > RoutingGraphUPtr
Definition: Forward.h:26
lanelet::routing::internal::VertexInfo
Internal information of a vertex in the graph If A* search is adapted, this could hold information ab...
Definition: Graph.h:18
lanelet::routing::internal::LaneChangeLaneletsCollector::LaneChangeInfo::target
ConstLanelet target
Definition: RoutingGraphBuilder.cpp:23
lanelet::routing::internal::RoutingGraphBuilder::addLaneletsToGraph
void addLaneletsToGraph(ConstLanelets &llts)
Definition: RoutingGraphBuilder.cpp:135
lanelet::routing::internal::LaneChangeLaneletsCollector::add
void add(ConstLanelet from, ConstLanelet to)
Definition: RoutingGraphBuilder.cpp:32
lanelet::routing::RoutingCostId
uint16_t RoutingCostId
Definition: Forward.h:44
lanelet::AreaLayer
lanelet::geometry::overlaps2d
IfAr< AreaT, bool > overlaps2d(const AreaT &area, const AreaT &otherArea)
lanelet::routing::internal::RoutingGraphBuilder::trafficRules_
const traffic_rules::TrafficRules & trafficRules_
Definition: RoutingGraphBuilder.h:59
lanelet::LaneletMapLayers
lanelet::routing::RelationType::Left
@ Left
(the only) directly adjacent, reachable left neighbour
lanelet::geometry::overlaps3d
IfAr< AreaT, bool > overlaps3d(const AreaT &area, const AreaT &otherArea, double heightTolerance)
other
lanelet::routing::internal::RoutingGraphBuilder::graph_
std::unique_ptr< RoutingGraphGraph > graph_
Definition: RoutingGraphBuilder.h:56
lanelet::routing::internal::RoutingGraphBuilder::bothWaysLaneletIds_
std::set< Id > bothWaysLaneletIds_
Definition: RoutingGraphBuilder.h:58
Graph.h
lanelet::LaneletLayer
lanelet::routing::RelationType::AdjacentLeft
@ AdjacentLeft
directly adjacent, unreachable left neighbor
lanelet::geometry::boundingBox2d
IfAr< AreaT, BoundingBox2d > boundingBox2d(const AreaT &area)
PrimitiveLayer< Lanelet >::size
size_t size() const
lanelet::geometry::leftOf
bool leftOf(const ConstLanelet &right, const ConstArea &left)
lanelet::routing::internal::RoutingGraphBuilder::addAreasToGraph
void addAreasToGraph(ConstAreas &areas)
Definition: RoutingGraphBuilder.cpp:142
PrimitiveLayer< Lanelet >::search
PrimitiveVec search(const BoundingBox2d &area)
ConstLineStringImpl< Point3d >::front
const ConstPointType & front() const noexcept
lanelet::routing::RelationType::AdjacentRight
@ AdjacentRight
directly adjacent, unreachable right neighbor
lanelet::ConstLineString3d
lanelet::traffic_rules::TrafficRules::canPass
virtual bool canPass(const ConstArea &area) const=0
lanelet::ConstLanelet
lanelet::routing::RoutingGraph::Configuration
std::map< std::string, Attribute > Configuration
Definition: RoutingGraph.h:72
lanelet::routing::internal::LaneChangeLaneletsCollector::LaneChangeInfo
Definition: RoutingGraphBuilder.cpp:22
lanelet::routing::internal::LaneChangeLaneletsCollector::LaneChangeLanelets
std::pair< ConstLanelets, ConstLanelets > LaneChangeLanelets
Definition: RoutingGraphBuilder.cpp:29
lanelet::ConstAreas
std::vector< ConstArea > ConstAreas
lanelet::ConstLaneletOrArea::lanelet
Optional< ConstLanelet > lanelet() const
lanelet::routing::internal::LaneChangeLaneletsCollector::laneChanges_
LaneChangeMap laneChanges_
Definition: RoutingGraphBuilder.cpp:83
ll
LaneletAdjacency ll
Definition: LaneletPath.cpp:88
lanelet::geometry::rightOf
bool rightOf(const ConstLanelet &left, const ConstArea &area)
graph_
const OriginalGraph * graph_
Definition: RouteBuilder.cpp:366
lanelet::routing::internal::LaneChangeLaneletsCollector::LaneChangeInfo::visited
bool visited
Definition: RoutingGraphBuilder.cpp:24
lanelet::routing::RelationType::Right
@ Right
(the only) directly adjacent, reachable right neighbour
lanelet::ConstLanelets
std::vector< ConstLanelet > ConstLanelets
Exceptions.h
adjacent
bool adjacent(const ConstArea &area1, const ConstArea &area2)
PrimitiveLayer< Lanelet >::end
iterator end()
lanelet::routing::internal::EdgeInfo
Internal information of an edge in the graph.
Definition: Graph.h:36
lanelet::routing::internal::LaneChangeLaneletsCollector::getLaneChangeLanelets
LaneChangeLanelets getLaneChangeLanelets(LaneChangeMap::iterator iter, Func1 &&prev, Func2 &&next)
Definition: RoutingGraphBuilder.cpp:49


lanelet2_routing
Author(s): Matthias Mayr
autogenerated on Sun Oct 27 2024 02:27:49