Hula-hooping robots reveal the physics behind keeping rings aloft