Skip to content

Commit

Permalink
fix(behavior_path_planner): fix drivable area expansion method outsid…
Browse files Browse the repository at this point in the history
…e intersection (#2861)

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
  • Loading branch information
takayuki5168 authored Feb 10, 2023
1 parent 95be33e commit d30616f
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2573,12 +2573,8 @@ void AvoidanceModule::generateExtendedDrivableArea(PathWithLaneId & path) const

// 2. when there are multiple turning lanes whose previous lanelet is the same in
// intersection
const lanelet::ConstLanelets next_lanes_from_intersection = std::invoke(
const lanelet::ConstLanelets next_lanes = std::invoke(
[&route_handler](const lanelet::ConstLanelet & lane) {
if (!lane.hasAttribute("turn_direction")) {
return lanelet::ConstLanelets{};
}

// get previous lane, and return false if previous lane does not exist
lanelet::ConstLanelets prev_lanes;
if (!route_handler->getPreviousLaneletsWithinRoute(lane, &prev_lanes)) {
Expand All @@ -2598,7 +2594,7 @@ void AvoidanceModule::generateExtendedDrivableArea(PathWithLaneId & path) const

// 2.1 look for neighbour lane, where end line of the lane is connected to end line of the
// original lane
for (const auto & next_lane : next_lanes_from_intersection) {
for (const auto & next_lane : next_lanes) {
if (current_lane.id() == next_lane.id()) {
continue;
}
Expand Down

0 comments on commit d30616f

Please sign in to comment.