Set HPIPM mode

Hi :wave: ,

First, thanks for your amazing works with Acados!

I wonder how (if it’s possible) to set the HPIPM mode through the python interface ? I saw that there are 4 modes implemented and I would like to use the robust or balance ones to increase the robustness of my solver.

Thanks in advance.

Amedeo

Hi Amedeo,

This is not interfaced (yet) but would be useful to have!
It would need to be added both in C and Python, I think.
Please feel encouraged to add support for this and make a pull request!

I am not sure when I will have time to do it myself, but would like to play around a bit more with HPIPM options in acados too.

Cheers,
Jonathan

Hi Jonathan,

Thanks for your quick response. I will not be able to add this feature (due to my poor knowledge of C language).
But if someone would like to make some tests with different HPIPM mode he can change the mode “by hand” (if I’m not wrong) on the C code into the file: acados → ocp_qp → ocp_qp_hpipm.c at the line 106 (see code below).
Modes are : “SPEED_ABS”, “SPEED”, “BALANCE”, “ROBUST” at my knowledge.

Then, compile again the library and HPIPM mode would be set.
Please correct me if I’m wrong!

void ocp_qp_hpipm_opts_initialize_default(void *config_, void *dims_, void *opts_)
{
    // ocp_qp_dims *dims = dims_;
    ocp_qp_hpipm_opts *opts = opts_;

//    d_ocp_qp_ipm_arg_set_default(SPEED, opts->hpipm_opts);
    d_ocp_qp_ipm_arg_set_default(BALANCE, opts->hpipm_opts);

Cheers,
Amedeo

That’s the quick way to go!
Leaving this open though.

1 Like