Open tfarger opened 1 week ago
Thanks! @MingxuanChe is this intentional? or should we add the line to LinearMPC as well?
Thank you for pointing this out.
In general, we could have the initial guess computation for completeness if you don't find any evidence against it. If you agree we should have it, please react with a thumb-up, and then I will add it.
There currently is no initial guess implemented in LinearMPC. In regular nonlinear MPC there is an initial guess computation using either ipopt or a constant LQR gain, that sets the initial values of the solver at the first time step, see https://github.com/utiasDSL/safe-control-gym/blob/253f25ca3490a6b54eb2d9698cc3ab9f1fd8f4e2/safe_control_gym/controllers/mpc/mpc.py#L340-L343
This is not implemented in the LinearMPC class
I am not sure if the initial guess is needed in the linear MPC. I think the MPC solver should get the same result in the first time step without initial guess. It could be useful for solver performance or something similar.