Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nav2_util/include/nav2_util/geometry_utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ inline Iter min_by(Iter begin, Iter end, Getter getCompareVal)
*/
inline double calculate_path_length(const nav_msgs::msg::Path & path, size_t start_index = 0)
{
if (start_index >= path.poses.size() - 1) {
if (start_index + 1 >= path.poses.size()) {
return 0.0;
}
double path_length = 0.0;
Expand Down