Controllability of a nonlinear hybrid system