Optimal path planning of two-wheeled mobile robots in the presence of dynamic obstacles