Added range sensing and obstacle avoidance