Skip to content

Added trapezoidal integration of the cost in Euler integration

Carlos Mastalli requested to merge cmastall/crocoddyl:topic/integrate-cost into devel

Previously, the sympletic Euler integrator didn't include any integration rule for the cost function. In practice, it means that the cost model defined by the user was in discrete time.

The problem with this approach is that cost function changes if the user changes the step integration. Therefore, I included a trapezoidal integration which it is an scaling factor of the cost function. Additionally, I have updated the cost functions for all the examples according to the time-step factor.

Additionally, I have split the code lines (again Euler integrator) in order to avoid memory allocation.

@wxmerkt, @jmarti, @proyan, @gfadini, @mfocchi, @bhammoud. Please do not forget to update your cost weights in any external code that depends on the Euler integrator. In simple word, you need to divide the weight value by the step-time only in the running costs.

Edited by Carlos Mastalli

Merge request reports

Loading