Obstacle avoidance of a mobile robot using model predictive control