1 #include <lanelet2_core/primitives/Lanelet.h> 14 std::string exampleMapPath = std::string(PKG_DIR) +
"/../lanelet2_maps/res/mapping_example.osm";
51 assert(!routingGraph->adjacentLeft(lanelet));
52 assert(!routingGraph->adjacentRight(lanelet));
53 assert(!!routingGraph->right(lanelet));
54 assert(routingGraph->besides(lanelet).size() == 3);
55 assert(routingGraph->following(lanelet).size() == 1);
56 assert(routingGraph->conflicting(lanelet).empty());
64 assert(paths.size() == 1);
65 paths = routingGraph->possiblePaths(lanelet, 100, 0,
true);
66 assert(paths.size() == 4);
71 ConstLanelets reachableSet = routingGraph->reachableSet(lanelet, 100, 0);
72 assert(reachableSet.size() > 10);
78 assert(!!shortestPath);
83 LaneletSequence lane = shortestPath->getRemainingLane(shortestPath->begin());
84 assert(!lane.
empty());
87 routingGraph->checkValidity();
108 assert(!shortestPath.
empty());
113 assert(!fullLane.empty());
117 auto right = route->rightRelation(lanelet);
123 assert(!routeMap->laneletLayer.empty());
140 ConstLanelet intersectLanelet = map->laneletLayer.get(185265);
141 assert(graphs.conflictingInGraph(lanelet, 1).empty());
142 assert(graphs.conflictingInGraph(intersectLanelet, 1).size() == 1);
static RoutingGraphUPtr build(const LaneletMap &laneletMap, const traffic_rules::TrafficRules &trafficRules, const RoutingCostPtrs &routingCosts=defaultRoutingCosts(), const Configuration &config=Configuration())
static constexpr char Germany[]
static constexpr const char Vehicle[]
std::shared_ptr< LaneletMap > LaneletMapPtr
bool empty() const noexcept
void part1CreatingAndUsingRoutingGraphs()
static TrafficRulesUPtr create(const std::string &location, const std::string &participant, TrafficRules::Configuration configuration=TrafficRules::Configuration())
static constexpr const char Pedestrian[]
void part3UsingRoutingGraphContainers()
std::vector< LaneletPath > LaneletPaths
boost::optional< T > Optional
std::unique_ptr< RoutingGraph > RoutingGraphUPtr
std::unique_ptr< LaneletMap > load(const std::string &filename, const Origin &origin=Origin::defaultOrigin(), ErrorMessages *errors=nullptr, const io::Configuration ¶ms=io::Configuration())
std::shared_ptr< const RoutingGraph > RoutingGraphConstPtr
std::shared_ptr< const LaneletSubmap > LaneletSubmapConstPtr
std::shared_ptr< TrafficRules > TrafficRulesPtr
std::vector< ConstLanelet > ConstLanelets