Hi
Thanks for sharing your code & experiment.
I am new to MPC and tried a variation of your exemple to try to park a car like this:

I just changed the initial conditions and the cost function but it does not seem to work. Do you this any good reason for this not to work ?