def close_to_obstacle(state):
    """
    Return true or false depending if we're within
    a certain distance of an obstacle. 
    """
    cutoff_dist = 0.5
    closest_obstacle = min(state[0])
    if (closest_obstacle < cutoff_dist):
        return True
    return False