From cc0d5af28c200eb7feec05a2bcb3c6b3a71b5dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Otgaar?= Date: Thu, 8 Jan 2026 12:56:22 +0100 Subject: [PATCH] chore: fixing bugs --- .../agents/communication/ri_communication_agent.py | 12 ++++++++++++ .../agents/user_interrupt/user_interrupt_agent.py | 7 +++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/control_backend/agents/communication/ri_communication_agent.py b/src/control_backend/agents/communication/ri_communication_agent.py index 34e5b25..45e3511 100644 --- a/src/control_backend/agents/communication/ri_communication_agent.py +++ b/src/control_backend/agents/communication/ri_communication_agent.py @@ -8,6 +8,7 @@ from zmq.asyncio import Context from control_backend.agents import BaseAgent from control_backend.agents.actuation.robot_gesture_agent import RobotGestureAgent from control_backend.core.config import settings +from control_backend.schemas.internal_message import InternalMessage from ..actuation.robot_speech_agent import RobotSpeechAgent from ..perception import VADAgent @@ -298,3 +299,14 @@ class RICommunicationAgent(BaseAgent): self.logger.debug("Restarting communication negotiation.") if await self._negotiate_connection(max_retries=1): self.connected = True + + async def handle_message(self, msg: InternalMessage): + """ + Handle an incoming message. + + Currently not implemented for this agent. + + :param msg: The received message. + :raises NotImplementedError: Always, since this method is not implemented. + """ + self.logger.warning("custom warning for handle msg in ri coms %s", self.name) 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 50df979..f48e14b 100644 --- a/src/control_backend/agents/user_interrupt/user_interrupt_agent.py +++ b/src/control_backend/agents/user_interrupt/user_interrupt_agent.py @@ -77,6 +77,9 @@ class UserInterruptAgent(BaseAgent): event_context, ) elif event_type == "pause": + self.logger.debug( + "Received pause/resume button press with context '%s'.", event_context + ) await self._send_pause_command(event_context) if event_context: self.logger.info("Sent pause command.") @@ -175,7 +178,7 @@ class UserInterruptAgent(BaseAgent): belief_id, ) - async def _send_pause_command(self, pause: bool): + async def _send_pause_command(self, pause): """ 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. @@ -188,7 +191,7 @@ class UserInterruptAgent(BaseAgent): ) await self.send(message) - if pause: + if pause == "true": # Send pause to VAD agent vad_message = InternalMessage( to=settings.agent_settings.vad_name,