robot scan and avoid condition robot theta 0 or 180