diff --git a/src/control_backend/agents/user_interrupt/user_interrupt_agent.py b/src/control_backend/agents/user_interrupt/user_interrupt_agent.py index 842231a..50df979 100644 --- a/src/control_backend/agents/user_interrupt/user_interrupt_agent.py +++ b/src/control_backend/agents/user_interrupt/user_interrupt_agent.py @@ -82,6 +82,7 @@ class UserInterruptAgent(BaseAgent): self.logger.info("Sent pause command.") else: self.logger.info("Sent resume command.") + elif event_type in ["next_phase", "reset_phase", "reset_experiment"]: await self._send_experiment_control_to_bdi_core(event_type) @@ -173,11 +174,11 @@ class UserInterruptAgent(BaseAgent): "Sent button_override belief with id '%s' to Program manager.", belief_id, ) - - async def _send_pause_command(self, pause : bool): + + async def _send_pause_command(self, pause: bool): """ Send a pause command to the Robot Interface via the RI Communication Agent. - Send a pause command to the other internal agents; for now just VAD agent. + Send a pause command to the other internal agents; for now just VAD agent. """ cmd = PauseCommand(data=pause) message = InternalMessage( @@ -206,7 +207,6 @@ class UserInterruptAgent(BaseAgent): await self.send(vad_message) self.logger.info("Sent resume command to VAD Agent and RI Communication Agent.") - async def setup(self): """ Initialize the agent. diff --git a/src/control_backend/schemas/ri_message.py b/src/control_backend/schemas/ri_message.py index 7c1ef22..e6eafa3 100644 --- a/src/control_backend/schemas/ri_message.py +++ b/src/control_backend/schemas/ri_message.py @@ -14,6 +14,7 @@ class RIEndpoint(str, Enum): GESTURE_TAG = "actuate/gesture/tag" PING = "ping" NEGOTIATE_PORTS = "negotiate/ports" + PAUSE = "" class RIMessage(BaseModel): @@ -65,6 +66,7 @@ class GestureCommand(RIMessage): raise ValueError("endpoint must be GESTURE_SINGLE or GESTURE_TAG") return self + class PauseCommand(RIMessage): """ A specific command to pause or unpause the robot's actions.