improved obstacle detection and robot motion