Thanks for the great tool that you’re developing.
I’m trying to slightly modify your pendulum example by transferring the terminal state from the cost function to the constraints.
I tried removing the cost on the final state and adding the following lines according to the pdf specifying the problem formulation.
# terminal constraints ocp.constraints.Jbx_e = np.eye(nx) # ocp.constraints.Jsbx_e = 1e-2*np.eye(nx) ocp.constraints.ubx_e = np.array([0.0, np.pi, 0.0, 0.0]) ocp.constraints.lbx_e = np.array([0.0, np.pi, 0.0, 0.0])
Unfortunately, it looks like the solver does not take this constraint into account since it converges to a “flat” solution (always 0 on the states and on the control).
Moreover, after these lines, if I ask for ocp.constraints.Jbx_e, I get the following error :
AttributeError: ‘AcadosOcpConstraints’ object has no attribute ‘_AcadosOcpConstraints__Jbx_e’
I guess this comes from the fact that in AcadosOcp.py, the declaration of self.__Jbx_e is commented…
I tried uncommenting it, resulting in no error, but the result of the solver is still the same !
Do you have any idea how to solve this ?