FrancescoRuscelli / horizon

an intuitive optimization tool tailored to robotics, based on CasADi
7 stars 9 forks source link

SQP++ Hessian computation optimization #16

Open EnricoMingo opened 3 years ago

EnricoMingo commented 3 years ago

At the moment the Hessian is computed as: H = J.transpose() * J; (1) this can be optimized using: _H.selfadjointView<Eigen::Lower>().rankUpdate(_J.transpose()); (2) however, we must pay attention to sparsity. Basically, the solver needs to be initialized with the sparsity from (1) but then in the solve we need to compute the Hessian as in (2), otherwise errors rise and it only works when the Hessian is diagonal.

EnricoMingo commented 2 years ago

@alaurenzi could you report here the error you have when running the Hessian computation with (2)?