A novel approach to path planning of Robots by detecting dynamic obstacles