예제 #1
0
파일: world.py 프로젝트: wakeupppp/revolve
 async def reset(self, rall=False, time_only=True, model_only=False):
     """
     Reset the world. Defaults to time only, since that appears to be the
     only thing that is working by default anyway.
     :param model_only:
     :param time_only:
     :param rall:
     """
     logger.info("Resetting the world state.")
     msg = world_control_pb2.WorldControl()
     msg.reset.all = rall
     msg.reset.model_only = model_only
     msg.reset.time_only = time_only
     await self.world_control.publish(msg)
예제 #2
0
    async def pause(self, pause):
        """
        Pause / unpause the world
        :param pause:
        :return: Future for the published message
        """
        if pause:
            logger.debug("Pausing the world.")
        else:
            logger.debug("Unpausing the world.")

        msg = world_control_pb2.WorldControl()
        msg.pause = pause
        return await self.world_control.publish(msg)
예제 #3
0
파일: world.py 프로젝트: lromor/revolve
    def pause(self, pause=True):
        """
        Pause / unpause the world
        :param pause:
        :return: Future for the published message
        """
        if pause:
            logger.debug("Pausing the world.")
        else:
            logger.debug("Resuming the world.")

        msg = world_control_pb2.WorldControl()
        msg.pause = pause
        fut = yield From(self.world_control.publish(msg))
        raise Return(fut)
예제 #4
0
파일: world.py 프로젝트: wakeupppp/revolve
    async def pause(self, pause=True):
        """
        Pause / unpause the world
        :param pause:
        :return: Future for the published message
        """
        if pause:
            logger.info("Pausing the world.")
        else:
            logger.info("Resuming the world.")

        msg = world_control_pb2.WorldControl()
        msg.pause = pause
        future = await self.world_control.publish(msg)
        return future
예제 #5
0
파일: world.py 프로젝트: lromor/revolve
 def reset(self, all=False, time_only=True, model_only=False):
     """
     Reset the world. Defaults to time only, since that appears to be the
     only thing that is working by default anyway.
     :param model_only:
     :param time_only:
     :param all:
     :return:
     """
     logger.debug("Resetting the world state.")
     msg = world_control_pb2.WorldControl()
     msg.reset.all = all
     msg.reset.model_only = model_only
     msg.reset.time_only = time_only
     fut = yield From(self.world_control.publish(msg))
     raise Return(fut)