Projection-based first-order constrained optimization solver for robotics