A Dynamic Planner for Safe and Predictable Human-Robot Collaboration