Optimal path planning of mobile robots for sample collection