Closed wxmerkt closed 4 years ago
I have tested a bit more the issue.
If you use crocoddyl.StdVec_VectorX()
for constructing xs_init
and us_init
, then there is no problem, e.g.
xs = crocoddyl.StdVec_VectorX()
us = crocoddyl.StdVec_VectorX()
for x in xs_init:
xs.append(x)
for u in us_init:
us.append(u)
ddp.solve(xs)
ddp.solver(xs, us)
I need to investigate a bit more how to solve this issue. It seems that boost option doesn't recognize List object conversion.
More updates.
@wxmerkt you have an error in the code, the dimension of the xs_init should be 4, not 2. This is the reason why it doesn't recognize the list. Maybe there is a way to make a warning message for these cases.
@wxmerkt you have an error in the code, the dimension of the xs_init should be 4, not 2.
Indeed, thanks for spotting it! This resolves the observed issue. Interesting that the silent overwriting hence memory messing up had this effect.
Managed to reliably reproduce the issue I referred to in #841. Here is a MWE:
Note, that each of the
ddp.solve(...)
options below should work the same. However, the only one that calls thecalc
method in our Python-derived class (which prints x and u and raises an exception to test) is the one with no arguments. The other calls toddp.solve(xs, us, etc.)
never call back into the Python-derived class.