A Control Architecture for Human-Robot Collaboration