Hi,
I want to provide initial condition to only specific states using nbx_0 and idxbx_0 in python. For example, I have 12 states and want to provide initial condition to only [2, 5, 8, 11] state indices.
When I set nbx_0 = 4 and idxbx_0 = [2, 5, 8, 11] and run the code, acados_ocp.json has “idxbx_0”: [ 0, 1, 2, 3 ] instead of [2, 5, 8, 11]. As a result the initial conditions are provided to states [0, 1, 2, 3] than [2, 5, 8, 11].
Can you please let me know if I am doing something wrong here?
Exception: acados -- mismatching dimensions for field idxbxe_0.
Provided data has dimensions (0,), while associated dimensions ['nbxe_0'] are (6,)
It seems similar to the one you fixed in the latest commit [ 2c64cab], so I wonder why won’t it work.
Btw, I have written my code using race_car as an example and I get same error.
When I tried this again with the latest hotfix [ f5fcf95]
I get this error
line 157, in make_ocp_dims_consistent
and dims.nbxe_0 == None and all(constraints.idxbxe_0 == constraints.idxbx_0):
TypeError: 'bool' object is not iterable
Right, sorry that was sloppy.
I made another hotfix. https://github.com/acados/acados/pull/639
Please pull again the latest master and let me know if there is another issue.