Skip to content

Commit

Permalink
fix(autoware_behavior_path_static_obstacle_avoidance_module): fix unu…
Browse files Browse the repository at this point in the history
…sedFunction (autowarefoundation#8732)

fix:unusedFunction

Signed-off-by: kobayu858 <yutaro.kobayashi@tier4.jp>
  • Loading branch information
kobayu858 authored Sep 3, 2024
1 parent 55cb0cc commit f189d1b
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,28 +92,6 @@ size_t findFirstNearestIndex(const T & points, const geometry_msgs::msg::Point &
return min_idx;
}

template <class T>
size_t findFirstNearestSegmentIndex(const T & points, const geometry_msgs::msg::Point & point)
{
const size_t nearest_idx = findFirstNearestIndex(points, point);

if (nearest_idx == 0) {
return 0;
}
if (nearest_idx == points.size() - 1) {
return points.size() - 2;
}

const double signed_length =
autoware::motion_utils::calcLongitudinalOffsetToSegment(points, nearest_idx, point);

if (signed_length <= 0) {
return nearest_idx - 1;
}

return nearest_idx;
}

geometry_msgs::msg::Polygon createVehiclePolygon(
const autoware::vehicle_info_utils::VehicleInfo & vehicle_info, const double offset)
{
Expand Down

0 comments on commit f189d1b

Please sign in to comment.