fixed return of obstacle when abs(x_diff) >= abs(y_diff)