I have use acados for a nonlinear ocp with a robot manipulator. I want to understand further how terminal cost and constraints work. Because if I just use the same cost and constraint for the path nodes and the terminal nodes then the solver cannot find a solution. However, if I only use the cost and constraint for the path node and ignore the last terminal state than the solver converges.
For a correct implementation the cost and constraint should be on the last state as well I would think. So is acados structured that it just has
N states and
N-1 control inputs and the
Nth state is the terminal state. If so, why can I not use the same cost there (without the part for the input of course)?
I am just trying to understand potential issues. Would be great if you could clarify this for me