alexliniger / MPCC

Model Predictive Contouring Controller (MPCC) for Autonomous Racing
Apache License 2.0
1.34k stars 371 forks source link

hipipmInterface::setCost #48

Closed DreamonZhu closed 4 years ago

DreamonZhu commented 4 years ago

Hi, https://github.com/alexliniger/MPCC/blob/3ec7805e7a176c57250c1a414a6d2b871e472d74/C%2B%2B/Interfaces/hpipm_interface.cpp#L60-#L63 here you get 4 matrix fot the cost of slack variables. According to the explaination here in https://github.com/alexliniger/MPCC/blob/3ec7805e7a176c57250c1a414a6d2b871e472d74/C%2B%2B/Interfaces/hpipm_interface.h#L112 so how did s_lower and supper arise? Cause in the paper, the corresponding cost C(S{c,k}) = q_s S_c,k + S_c,k^T q_ss * S_c,k , which only has a varible s_c,k.

alexliniger commented 4 years ago

This is related to the hpipm interface, that has slacks for the upper and the lower values of the constraint. Otherwise it is basically the same, you can always consider upper and lower limits as twice as many constraints.