Exploration, Path Planning with Obstacle and Collision Avoidance in a Dynamic Environment