Skip to content

Commit 8f7b6ce

Browse files
critical fix for path tracking MPPI (#4099)
1 parent f020478 commit 8f7b6ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nav2_mppi_controller/include/nav2_mppi_controller/tools/utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ inline unsigned int removePosesAfterFirstInversion(nav_msgs::msg::Path & path)
698698
inline size_t findClosestPathPt(const std::vector<float> & vec, float dist, size_t init = 0)
699699
{
700700
auto iter = std::lower_bound(vec.begin() + init, vec.end(), dist);
701-
if (iter == vec.begin()) {
701+
if (iter == vec.begin() + init) {
702702
return 0;
703703
}
704704
if (dist - *(iter - 1) < *iter - dist) {

0 commit comments

Comments
 (0)