A random sampling based algorithm for ship path planning with obstacles