Function hateb_local_planner::distance_point_to_polygon_2d

Function Documentation

inline double hateb_local_planner::distance_point_to_polygon_2d(const Eigen::Vector2d &point, const Point2dContainer &vertices)

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

Parameters:
  • point – 2D point

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

Returns:

smallest distance between point and polygon