Skip to content

Commit

Permalink
fix(behavior_path_planner): prevent crashes with the drivable area ex…
Browse files Browse the repository at this point in the history
…pansion
  • Loading branch information
maxime-clem committed Oct 5, 2023
1 parent 7926195 commit 667e05d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ polygon_t createExpansionPolygon(
boost::geometry::buffer(
base_ls, polygons, distance_strategy, strategy::side_straight(), strategy::join_miter(),
strategy::end_flat(), strategy::point_square());
return polygons.front();
return polygons.empty() ? polygon_t{} : polygons.front();
}

std::array<double, 3> calculate_arc_length_range_and_distance(
Expand Down

0 comments on commit 667e05d

Please sign in to comment.