Function hateb_local_planner::closest_point_on_line_segment_2d

Function Documentation

inline Eigen::Vector2d hateb_local_planner::closest_point_on_line_segment_2d(const Eigen::Ref<const Eigen::Vector2d> &point, const Eigen::Ref<const Eigen::Vector2d> &line_start, const Eigen::Ref<const Eigen::Vector2d> &line_end)

Helper function to obtain the closest point on a line segment w.r.t. a reference point.

Parameters:
  • point – 2D point

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

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

Returns:

Closest point on the line segment