Local motion planner for dynamic environments