Where autoGen_obj_quadraticCost is the similar to autoGen_obj_quadraticCost2 with the only difference being the R matrix is not zeros. I tried this but at the end the control just blows up since I suppose the cost function defined in autoGen_obj_quadraticCost2 also is used to calculate the cost on states other than the last state.
Hi, I am trying to add a terminal cost to the objective function that is only state dependent, I tried doing this:
and in the objective function I gave to the problem I did this
Where
autoGen_obj_quadraticCost
is the similar toautoGen_obj_quadraticCost2
with the only difference being the R matrix is not zeros. I tried this but at the end the control just blows up since I suppose the cost function defined inautoGen_obj_quadraticCost2
also is used to calculate the cost on states other than the last state.Can anyone help me on this matter?
Thanks in advance!