Conversation
| 'n_row': __hpipm.d_ocp_qp_dim_get_nx, | ||
| 'n_col': __hpipm.d_ocp_qp_dim_get_nu, |
There was a problem hiding this comment.
It was correct at it was before, K is the state feedback matrix of size nu times nx.
It is probably a bit confusing, but n_row is the number of rows, not the length of each row.
Consistently with that, the (column) vectors lr, p and k have n_row but not n_col.
There was a problem hiding this comment.
If you found numerically from the example that it was wrong as it was before, it may be that the issue is this: HPIPM writes back the result in column-major, but numpy matrices are row-major by default.
If this is the case, either the feedback matrix is saved in a temporary matrix and transposed into the actual one, or the zeros numpy matrix is set to column-major before getting the data from C, e.g. like in https://github.com/giaf/hpipm/blob/master/interfaces/python/hpipm_python/hpipm_python/wrapper/hpipm_ocp_qp.py#L75 (note that here we did for setters, but it may also make the job for the getters).
There was a problem hiding this comment.
Column- vs. row-major was indeed the problem! thanks 👍
|
@sandmaennchen trying to compile the python interface, I get the error I have python 3.8. It seems to be unhappy of the Union stuff, removing that the error is gone. Any hint? |
|
Hi @giaf, type hints should now be backward compatible with python 3.8! |
print_stats()which prints a summary of the IP iterationsidx_endis given