Motion planning with uncertainty