Beginning of path planning.