nobleo / path_tracking_pid

Path Tracking PID offers a tuneable PID control loop, decouling steering and forward velocity
Apache License 2.0
130 stars 37 forks source link

Replaced for loop with algorithm. #65

Closed lewie-donckers closed 2 years ago

lewie-donckers commented 2 years ago

This PR replaces a raw for loop with an algorithm. In principle, you should not use raw for loops. Preferably replace them with an algorithm or at least a range-based for loop. This all to express intent: indicate what should be done rather than just how it should be done.

Sometimes (like in this case), the standard (or Boost) has no suitable algorithm. I then prefer to write my own.

I realize this change might be controversial but at the very least I wanted to show you how this can be done.

Note the following:

lewie-donckers commented 2 years ago

Based on feedback, I'll close this PR to focus on other changes.