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 authored and masf7g committed Mar 22, 2024
1 parent 76ec075 commit 91c0cb0
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 91c0cb0

Please sign in to comment.