The famous route object that marks a route from A to B. More...
#include <Route.h>
Public Types | |
using | Errors = std::vector< std::string > |
Public Member Functions | |
ConstLaneletOrAreas | allConflictingInMap () const |
Provides all lanelets in the map that conflict with any lanelet in the route. More... | |
Errors | checkValidity (bool throwOnError=false) const |
Perform some sanity checks on the route. More... | |
ConstLaneletOrAreas | conflictingInMap (const ConstLanelet &lanelet) const |
Information about conflicting lanelets of a lanelet within all passable lanelets in the laneletMap. More... | |
ConstLanelets | conflictingInRoute (const ConstLanelet &lanelet) const |
Information about conflicting lanelets of a lanelet within the route. More... | |
bool | contains (const ConstLanelet &lanelet) const |
Checks if a specific lanelet is part of the route. More... | |
ConstLanelets | following (const ConstLanelet &lanelet) const |
Similar to followingRelations but directly provides the following lanelets within the Route. More... | |
LaneletRelations | followingRelations (const ConstLanelet &lanelet) const |
Provides information of the following lanelets within the Route. More... | |
void | forEachPredecessor (const ConstLanelet &lanelet, const LaneletVisitFunction &f) const |
Similar to forEachSuccessor but goes backwards in the routing graph instead of forwards. More... | |
void | forEachSuccessor (const ConstLanelet &lanelet, const LaneletVisitFunction &f) const |
LaneletSequence | fullLane (const ConstLanelet &ll) const |
Returns the complete lane a Lanelet belongs to. Circular lanes will always have 'll' as the first element. More... | |
LaneletMapPtr | getDebugLaneletMap () const |
Get a laneletMap that represents the Lanelets of the Route and their relationship. More... | |
LaneletMapConstPtr | laneletMap () const noexcept |
A LaneletMap with all lanelets that are part of the route and those referenced by regelems. More... | |
LaneletSubmapConstPtr | laneletSubmap () const noexcept |
A LaneletSubmap with all lanelets that are part of the route. More... | |
Optional< LaneletRelation > | leftRelation (const ConstLanelet &lanelet) const |
Provides information of the lanelet left of a given lanelet within the Route. More... | |
LaneletRelations | leftRelations (const ConstLanelet &lanelet) const |
Provides information of the all lanelets left of a given lanelet within the Route. More... | |
double | length2d () const |
Get the 2d length of the shortest path of this route. More... | |
size_t | numLanes () const |
Returns the number of individual lanes. More... | |
Route & | operator= (const Route &other)=delete |
Route & | operator= (Route &&other) noexcept |
ConstLanelets | previous (const ConstLanelet &lanelet) const |
Similar to followingRelations but directly provides the following lanelets within the Route. More... | |
LaneletRelations | previousRelations (const ConstLanelet &lanelet) const |
Provides information of the previous lanelets within the Route. More... | |
LaneletSequence | remainingLane (const ConstLanelet &ll) const |
Returns that remaining lane a Lanelet belongs to. More... | |
LaneletPath | remainingShortestPath (const ConstLanelet &ll) const |
Obtains the remaining shortest path to the destination. If the route is circular, the result will always have the same length and end before the lanelet passed as input argument. More... | |
Optional< LaneletRelation > | rightRelation (const ConstLanelet &lanelet) const |
Provides information of the lanelet right of a given lanelet within the Route. More... | |
LaneletRelations | rightRelations (const ConstLanelet &lanelet) const |
Provides information of the all lanelets right of a given lanelet within the Route. More... | |
Route () | |
Route (const Route &other)=delete | |
Route (LaneletPath shortestPath, std::unique_ptr< internal::RouteGraph > graph, LaneletSubmapConstPtr laneletSubmap) noexcept | |
Constructs a route. Not supposed to be called directly. Use RoutingGraph to obtain routes. More... | |
Route (Route &&other) noexcept | |
const LaneletPath & | shortestPath () const noexcept |
Returns the shortest path that was the base of this route. More... | |
size_t | size () const |
Number of Lanelets in the route. More... | |
~Route () noexcept | |
Private Attributes | |
std::unique_ptr< internal::RouteGraph > | graph_ |
The internal graph. More... | |
LaneletSubmapConstPtr | laneletSubmap_ |
LaneletSubmap with all lanelets that are part of the route. More... | |
LaneletPath | shortestPath_ |
The underlying shortest path used to create the route. More... | |
The famous route object that marks a route from A to B.
using lanelet::routing::Route::Errors = std::vector<std::string> |
|
default |
|
delete |
|
defaultnoexcept |
|
defaultnoexcept |
|
noexcept |
Constructs a route. Not supposed to be called directly. Use RoutingGraph to obtain routes.
ConstLaneletOrAreas lanelet::routing::Route::allConflictingInMap | ( | ) | const |
Route::Errors lanelet::routing::Route::checkValidity | ( | bool | throwOnError = false | ) | const |
ConstLaneletOrAreas lanelet::routing::Route::conflictingInMap | ( | const ConstLanelet & | lanelet | ) | const |
Information about conflicting lanelets of a lanelet within all passable lanelets in the laneletMap.
lanelet | Lanelet to find conflicting lanelets to |
ConstLanelets lanelet::routing::Route::conflictingInRoute | ( | const ConstLanelet & | lanelet | ) | const |
Information about conflicting lanelets of a lanelet within the route.
lanelet | Lanelet to find conflicting lanelets to |
bool lanelet::routing::Route::contains | ( | const ConstLanelet & | lanelet | ) | const |
ConstLanelets lanelet::routing::Route::following | ( | const ConstLanelet & | lanelet | ) | const |
LaneletRelations lanelet::routing::Route::followingRelations | ( | const ConstLanelet & | lanelet | ) | const |
void lanelet::routing::Route::forEachPredecessor | ( | const ConstLanelet & | lanelet, |
const LaneletVisitFunction & | f | ||
) | const |
void lanelet::routing::Route::forEachSuccessor | ( | const ConstLanelet & | lanelet, |
const LaneletVisitFunction & | f | ||
) | const |
Can be used to search the route object with a custom function that is called for the successors of lanelet. This function works similar to RoutingGraph::forEachSuccessor. Which costs and whether lane changes are used to determine the shortest path depends on the cost id that was used to create this route object.
LaneletSequence lanelet::routing::Route::fullLane | ( | const ConstLanelet & | ll | ) | const |
LaneletMapPtr lanelet::routing::Route::getDebugLaneletMap | ( | ) | const |
|
inlinenoexcept |
A LaneletMap with all lanelets that are part of the route and those referenced by regelems.
Due to this behaviour that the map can contain lanelets that are not on the route, this function is deprecated. laneletSubmap() only returns lanelets on the map. To get the old behaviour use laneletSubmap()->laneletMap().
|
inlinenoexcept |
A LaneletSubmap with all lanelets that are part of the route.
Can be used to do spatial lookups like 'which Lanelets of the route are close to my position'. It does not contain anything beyond that, no points, linestrings, etc.
Optional< LaneletRelation > lanelet::routing::Route::leftRelation | ( | const ConstLanelet & | lanelet | ) | const |
Provides information of the lanelet left of a given lanelet within the Route.
lanelet | Lanelet to get information about. |
LaneletRelations lanelet::routing::Route::leftRelations | ( | const ConstLanelet & | lanelet | ) | const |
Provides information of the all lanelets left of a given lanelet within the Route.
lanelet | Lanelet to get information about. |
double lanelet::routing::Route::length2d | ( | ) | const |
size_t lanelet::routing::Route::numLanes | ( | ) | const |
ConstLanelets lanelet::routing::Route::previous | ( | const ConstLanelet & | lanelet | ) | const |
LaneletRelations lanelet::routing::Route::previousRelations | ( | const ConstLanelet & | lanelet | ) | const |
LaneletSequence lanelet::routing::Route::remainingLane | ( | const ConstLanelet & | ll | ) | const |
LaneletPath lanelet::routing::Route::remainingShortestPath | ( | const ConstLanelet & | ll | ) | const |
Obtains the remaining shortest path to the destination. If the route is circular, the result will always have the same length and end before the lanelet passed as input argument.
ll | a lanelet on the shortest path |
Optional< LaneletRelation > lanelet::routing::Route::rightRelation | ( | const ConstLanelet & | lanelet | ) | const |
Provides information of the lanelet right of a given lanelet within the Route.
lanelet | Lanelet to get information about. |
LaneletRelations lanelet::routing::Route::rightRelations | ( | const ConstLanelet & | lanelet | ) | const |
Provides information of the all lanelets right of a given lanelet within the Route.
lanelet | Lanelet to get information about. |
|
inlinenoexcept |
size_t lanelet::routing::Route::size | ( | ) | const |
|
private |
|
private |
LaneletSubmap with all lanelets that are part of the route.
|
private |