Skip to content

Commit a7927e2

Browse files
committed
Last fixes.
Signed-off-by: silanus23 <[email protected]>
1 parent e22557f commit a7927e2

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

nav2_util/include/nav2_util/path_utils.hpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,19 @@ struct PathSearchResult
3939
double distance;
4040
size_t closest_segment_index;
4141
};
42-
42+
/**
43+
* @brief Finds the minimum distance from a robot pose to a path segment.
44+
*
45+
* This function searches for the closest segment on the given path to the robot's pose,
46+
* starting from a specified index and optionally limiting the search to a window length.
47+
* It returns the minimum distance found and the index of the closest segment.
48+
*
49+
* @param path The path to search (sequence of poses).
50+
* @param robot_pose The robot's current pose.
51+
* @param start_index The index in the path to start searching from.
52+
* @param search_window_length The maximum length (in meters) to search along the path.
53+
* @return PathSearchResult Struct containing the minimum distance and the index of the closest segment.
54+
*/
4355
PathSearchResult distance_from_path(
4456
const nav_msgs::msg::Path & path,
4557
const geometry_msgs::msg::PoseStamped & robot_pose,

0 commit comments

Comments
 (0)