Closed wxmerkt closed 5 years ago
So the issue is this line here: https://github.com/ipab-slmc/exotica/blob/3462afd9928c02989754de09229f7ea6daebea23/exotations/solvers/exotica_ddp_solver/src/abstract_ddp_solver.cpp#L61
The solution is resized to T
, not to T - 1
, which is the issue (in the first paragraph you said T-1
).
If the problem horizon is
T
, then:X
is of sizeT
U
is of sizeT-1
solution
inSolve
in the solvers is resized toT
without initialising or reinitialising to 0. At the end of solve, only the T-1th rows are getting set from the best U. That returns an additional row with a wrongly initialised memory.Two possible solutions: a) The returned solution should be of size
T-1
b) The final command should be a hold/inverse dynamics solution or zeros.I tend to (a).