Skip to content

Commit

Permalink
critical fix for path tracking MPPI (ros-navigation#4099)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMacenski committed Feb 6, 2024
1 parent f020478 commit 8f7b6ce
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ inline unsigned int removePosesAfterFirstInversion(nav_msgs::msg::Path & path)
inline size_t findClosestPathPt(const std::vector<float> & vec, float dist, size_t init = 0)
{
auto iter = std::lower_bound(vec.begin() + init, vec.end(), dist);
if (iter == vec.begin()) {
if (iter == vec.begin() + init) {
return 0;
}
if (dist - *(iter - 1) < *iter - dist) {
Expand Down

0 comments on commit 8f7b6ce

Please sign in to comment.