Skip to content

Commit

Permalink
fix(lanelet2_extension,had_map_utils): fix node dying bug by lanelet …
Browse files Browse the repository at this point in the history
…resampling (autowarefoundation#1506)

* fix: lanelet empty case

* fix(lanelet2_extension,had_map_utils): fix case point 1

Co-authored-by: Maxime CLEMENT <[email protected]>

* fix(lanelet2_extension,had_map_utils): fix case point 1

Co-authored-by: Maxime CLEMENT <[email protected]>

Co-authored-by: Maxime CLEMENT <[email protected]>
  • Loading branch information
2 people authored and yukke42 committed Oct 14, 2022
1 parent 6b5b576 commit 3a088c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions common/had_map_utils/src/had_map_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ std::vector<lanelet::BasicPoint3d> resamplePoints(

// Calculate accumulated lengths
const auto accumulated_lengths = calculateAccumulatedLengths(line_string);
if (accumulated_lengths.size() < 2) return {};

// Create each segment
std::vector<lanelet::BasicPoint3d> resampled_points;
Expand Down
1 change: 1 addition & 0 deletions map/lanelet2_extension/lib/utilities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ std::vector<lanelet::BasicPoint3d> resamplePoints(

// Calculate accumulated lengths
const auto accumulated_lengths = calculateAccumulatedLengths(line_string);
if (accumulated_lengths.size() < 2) return {};

// Create each segment
std::vector<lanelet::BasicPoint3d> resampled_points;
Expand Down

0 comments on commit 3a088c1

Please sign in to comment.