Skip to content

Commit

Permalink
fix(behavior_path_planner): add guard to extend lane
Browse files Browse the repository at this point in the history
Signed-off-by: kosuke55 <[email protected]>
  • Loading branch information
kosuke55 committed Oct 25, 2023
1 parent 6e60536 commit 6cae986
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions planning/behavior_path_planner/src/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3104,6 +3104,8 @@ lanelet::ConstLanelets getCurrentLanesFromPath(
lanelet::ConstLanelets extendNextLane(
const std::shared_ptr<RouteHandler> route_handler, const lanelet::ConstLanelets & lanes)
{
if (lanes.empty()) return lanes;

auto extended_lanes = lanes;

// Add next lane
Expand All @@ -3125,6 +3127,8 @@ lanelet::ConstLanelets extendNextLane(
lanelet::ConstLanelets extendPrevLane(
const std::shared_ptr<RouteHandler> route_handler, const lanelet::ConstLanelets & lanes)
{
if (lanes.empty()) return lanes;

auto extended_lanes = lanes;

// Add previous lane
Expand Down

0 comments on commit 6cae986

Please sign in to comment.