def is_free_state(x0, obstacles, posmin, posmax):
    """ Check if x0 is free state given list of obstacles"""
    if any([x0[0] >= obstacle[0] and x0[0] <= obstacle[1] and \
             x0[1] >= obstacle[2] and x0[1] <= obstacle[3] \
             for obstacle in obstacles]):
        return False
    return True