Model-based design and control of deformable robots and haptic devices