Skip to content

Commit

Permalink
critical fix for path tracking MPPI (#4099) (#4101)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8f7b6ce)

Co-authored-by: Steve Macenski <stevenmacenski@gmail.com>
  • Loading branch information
mergify[bot] and SteveMacenski authored Feb 6, 2024
1 parent 54a45cb commit b489f5b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,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 b489f5b

Please sign in to comment.