A differential drive wheeled robot is a kind of mobile robot suitable for indoor navigation. Model predictive control is an optimal control technique with various advantages and can achieve excellent performance. One of the main advantages of model predictive control is that it can easily handle constraints. Therefore, it deals with realistic constraints of the mobile robot and achieves admirable performance for trajectory tracking. In addition, the intention of the robot can be properly realized by adjusting the weight of the cost function component. This control technique is applied to the local planner of the navigation component so that the mobile robot can operate in real environment. Using the Robot Operating System (ROS), which has transcendent advantages in robot development, we have ensured that the algorithm works in the simulation and real experiment.