Execution and analysis of high-level tasks with dynamic obstacle anticipation