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)
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)
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)
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
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)