Python persists asking for properties for initial shooting node

Hello,

I am trying to formulate an mpc problem in python and I am using:

ocp.cost.cost_type = 'LINEAR_LS'
ocp.cost.cost_type_e = 'LINEAR_LS'

When i am trying to run it, it looks for W_0 and yref_0 and throws an exception for inconsistent dimensions.

Since I am not defining cost_type_0 why does it complain?

If you do not specify the cost at the initial shooting node, acados will copy whatever is defined as a path cost for the initial node.
Thus, if you get an exception about inconsistent dimension you should check your path cost.

1 Like