Cartesian Stiffness Shaping of Compliant Robots—Incremental Learning and Optimization Based on Sequential Quadratic Programming