Design and Modeling of Variable Stiffness Mechanisms for Collaborative Robots and Flexible Grasping