A Hybrid Model Predictive Controller for Path Planning and Path Following