Function hateb_local_planner::distance_segment_to_polygon_2d

Function Documentation

inline double hateb_local_planner::distance_segment_to_polygon_2d(const Eigen::Vector2d &line_start, const Eigen::Vector2d &line_end, const Point2dContainer &vertices)

Helper function to calculate the smallest distance between a line segment and a closed polygon.

Parameters:
  • line_start – 2D point representing the start of the line segment

  • line_end – 2D point representing the end of the line segment

  • vertices – Vertices describing the closed polygon (the first vertex is not repeated at the end)

Returns:

smallest distance between point and polygon