How to set weights of costs according to the time interval in MPC prediction horizon

Thank you for your help! I believe you actually got my point. So what I have to do is to set the ocp.cost.cost_type and ocp.cost.cost_type to ‘EXTERNAL’ and then run \text{ocp_solver.set}(n, `p', \omega_{n}) for every shooting interval from 0 to N since N is the number of shooting intervals, am I getting it right?

By the way, is the parameter p directly mutiplied on the cost function? I didn’t find much explanation of p in documents of ACADOS, but according to your advice it seems like what I inferred.

2 Likes