added callback for obstacle avoidance