Iterative learning control for spatial path tracking