Multi-Layered Safety of Redundant Robot Manipulators via Task-Oriented Planning and Control