Redundancy management of a LWR4+ for safe, collision free, robotic surgical applications, using environmental sensors