Safety in Human-Robot Collaborative Manufacturing Environments: Metrics and Control