Nonlinear waves in flexible mechanical metamaterials