Coarse and fine motion planning combined