Constrained Optimized Command Shaping for Minimizing Residual Vibration in a Flexible-Joint Robot