Dynamics of oscillators with impact and friction