File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
nav2_util/include/nav2_util Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,19 @@ struct PathSearchResult
39
39
double distance;
40
40
size_t closest_segment_index;
41
41
};
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
+ */
43
55
PathSearchResult distance_from_path (
44
56
const nav_msgs::msg::Path & path,
45
57
const geometry_msgs::msg::PoseStamped & robot_pose,
You can’t perform that action at this time.
0 commit comments