Study of a unilateral oscillator with friction