Skip to content

Commit

Permalink
fix(avoidance): include shoulder lane to avoid (autowarefoundation#5750)
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 committed Dec 7, 2023
1 parent 8c05ced commit 515a084
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ std::vector<DrivableLanes> generateDrivableLanes(
drivable_lanes.at(i).left_lane = current_lane;
drivable_lanes.at(i).right_lane = current_lane;

const auto left_lane = route_handler.getLeftLanelet(current_lane);
const auto right_lane = route_handler.getRightLanelet(current_lane);
const auto left_lane = route_handler.getLeftLanelet(current_lane, false, false);
const auto right_lane = route_handler.getRightLanelet(current_lane, false, false);
if (!left_lane && !right_lane) {
continue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class RouteHandler
*/
boost::optional<lanelet::ConstLanelet> getRightLanelet(
const lanelet::ConstLanelet & lanelet, const bool enable_same_root = false,
const bool get_shoulder_lane = false) const;
const bool get_shoulder_lane = true) const;

/**
* @brief Check if same-direction lane is available at the left side of the lanelet
Expand All @@ -134,7 +134,7 @@ class RouteHandler
*/
boost::optional<lanelet::ConstLanelet> getLeftLanelet(
const lanelet::ConstLanelet & lanelet, const bool enable_same_root = false,
const bool get_shoulder_lane = false) const;
const bool get_shoulder_lane = true) const;
lanelet::ConstLanelets getNextLanelets(const lanelet::ConstLanelet & lanelet) const;
lanelet::ConstLanelets getPreviousLanelets(const lanelet::ConstLanelet & lanelet) const;

Expand Down

0 comments on commit 515a084

Please sign in to comment.