OCS2 assumes optimization problems with inequality constitution of type h(x, u) >= 0, and at each iteration of MPC, OCS2 uses the second-order approximation of this inequality constraint.
To find a solution for each sub-problem, the feasible set of the sub-problem should be a convex set. This is the case if the hessian of h(x, u) is n.s.d.
As a simple example for a system with one state and one input: x^2 + u^2 – 1 > 0 is not a convex set but -x^2 - u^2 + 1 > 0 is a convex set.
Originally posted by @farbod-farshidian in #18 (comment)