Fixed error in while condition. Robot does not cross horizontal walls