Commit d89459c 1 parent 95ba51d commit d89459c Copy full SHA for d89459c
File tree 3 files changed +15
-4
lines changed
map/autoware_map_projection_loader/src
planning/behavior_path_planner/autoware_behavior_path_goal_planner_module
include/autoware/behavior_path_goal_planner_module
3 files changed +15
-4
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,7 @@ tier4_map_msgs::msg::MapProjectorInfo load_info_from_lanelet2_map(const std::str
30
30
lanelet::ErrorMessages errors{};
31
31
lanelet::projection::MGRSProjector projector{};
32
32
const lanelet::LaneletMapPtr map = lanelet::load (filename, projector, &errors);
33
-
34
33
if (!errors.empty ()) {
35
- for (const auto & error : errors) {
36
- std::cout << error << std::endl;
37
- }
38
34
throw std::runtime_error (" Error occurred while loading lanelet2 map" );
39
35
}
40
36
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class GoalSearcher : public GoalSearcherBase
65
65
const std::shared_ptr<const PlannerData> & planner_data) const ;
66
66
BasicPolygons2d getNoParkingAreaPolygons (const lanelet::ConstLanelets & lanes) const ;
67
67
BasicPolygons2d getNoStoppingAreaPolygons (const lanelet::ConstLanelets & lanes) const ;
68
+ BasicPolygons2d getBusStopAreaPolygons (const lanelet::ConstLanelets & lanes) const ;
68
69
bool isInAreas (const LinearRing2d & footprint, const BasicPolygons2d & areas) const ;
69
70
70
71
LinearRing2d vehicle_footprint_{};
Original file line number Diff line number Diff line change 19
19
#include " autoware/behavior_path_planner_common/utils/path_utils.hpp"
20
20
#include " autoware/behavior_path_planner_common/utils/utils.hpp"
21
21
#include " autoware/universe_utils/geometry/boost_polygon_utils.hpp"
22
+ #include " autoware_lanelet2_extension/regulatory_elements/bus_stop_area.hpp"
22
23
#include " autoware_lanelet2_extension/regulatory_elements/no_parking_area.hpp"
23
24
#include " autoware_lanelet2_extension/regulatory_elements/no_stopping_area.hpp"
25
+ #include " autoware_lanelet2_extension/utility/query.hpp"
24
26
#include " autoware_lanelet2_extension/utility/utilities.hpp"
25
27
26
28
#include < boost/geometry/algorithms/union.hpp>
@@ -490,6 +492,18 @@ BasicPolygons2d GoalSearcher::getNoStoppingAreaPolygons(const lanelet::ConstLane
490
492
return area_polygons;
491
493
}
492
494
495
+ BasicPolygons2d GoalSearcher::getBusStopAreaPolygons (const lanelet::ConstLanelets & lanes) const
496
+ {
497
+ BasicPolygons2d area_polygons{};
498
+ for (const auto & bus_stop_area_reg_elem : lanelet::utils::query::busStopAreas (lanes)) {
499
+ for (const auto & area : bus_stop_area_reg_elem->busStopAreas ()) {
500
+ const auto & area_poly = lanelet::utils::to2D (area).basicPolygon ();
501
+ area_polygons.push_back (area_poly);
502
+ }
503
+ }
504
+ return area_polygons;
505
+ }
506
+
493
507
bool GoalSearcher::isInAreas (const LinearRing2d & footprint, const BasicPolygons2d & areas) const
494
508
{
495
509
for (const auto & area : areas) {
You can’t perform that action at this time.
0 commit comments