A model for the cooperation between robots and smart environments