Finding the direction of the robot