RoboticExplorationLab / Altro.jl

MIT License
139 stars 41 forks source link

Switch to using a general factorization method #21

Closed sscheele closed 2 years ago

sscheele commented 3 years ago

_projection_solve! uses a Cholesky factorization to help evaluate constraint violations (pn_methods.jl:98). However, Cholesky factorization only works on matrices which are positive definite. I don't think the matrix in question is necessarily positive definite (for instance, in the case of goal constraints. I've edited the code to use LinearAlgebra.factorize instead, which will still perform Cholesky factorization when possible for performance, but will use alternate factorizations when necessary. I'm not certain this is a mathematically correct approach.

bjack205 commented 2 years ago

Sorry for not addressing this earlier, I'm going back over open PRs after a period of not actively maintaining this. This is being fixed in the new version where we use LDLt decomposition on the entire KKT system, which should be much more robust. See #31