doAddRunningCost will not properly handle the discontinuities in velocity from impacts. I added a function which will only add a cost on sum of velocity squared, but will properly handle discontinuities. Code was tested on optimizing leaps for Spirit.
doAddRunningCost
will not properly handle the discontinuities in velocity from impacts. I added a function which will only add a cost on sum of velocity squared, but will properly handle discontinuities. Code was tested on optimizing leaps for Spirit.This change is![Reviewable](https://reviewable.io/review_button.svg)