chore: fixing bugs
This commit is contained in:
@@ -8,6 +8,7 @@ from zmq.asyncio import Context
|
|||||||
from control_backend.agents import BaseAgent
|
from control_backend.agents import BaseAgent
|
||||||
from control_backend.agents.actuation.robot_gesture_agent import RobotGestureAgent
|
from control_backend.agents.actuation.robot_gesture_agent import RobotGestureAgent
|
||||||
from control_backend.core.config import settings
|
from control_backend.core.config import settings
|
||||||
|
from control_backend.schemas.internal_message import InternalMessage
|
||||||
|
|
||||||
from ..actuation.robot_speech_agent import RobotSpeechAgent
|
from ..actuation.robot_speech_agent import RobotSpeechAgent
|
||||||
from ..perception import VADAgent
|
from ..perception import VADAgent
|
||||||
@@ -298,3 +299,14 @@ class RICommunicationAgent(BaseAgent):
|
|||||||
self.logger.debug("Restarting communication negotiation.")
|
self.logger.debug("Restarting communication negotiation.")
|
||||||
if await self._negotiate_connection(max_retries=1):
|
if await self._negotiate_connection(max_retries=1):
|
||||||
self.connected = True
|
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)
|
||||||
|
|||||||
@@ -77,6 +77,9 @@ class UserInterruptAgent(BaseAgent):
|
|||||||
event_context,
|
event_context,
|
||||||
)
|
)
|
||||||
elif event_type == "pause":
|
elif event_type == "pause":
|
||||||
|
self.logger.debug(
|
||||||
|
"Received pause/resume button press with context '%s'.", event_context
|
||||||
|
)
|
||||||
await self._send_pause_command(event_context)
|
await self._send_pause_command(event_context)
|
||||||
if event_context:
|
if event_context:
|
||||||
self.logger.info("Sent pause command.")
|
self.logger.info("Sent pause command.")
|
||||||
@@ -175,7 +178,7 @@ class UserInterruptAgent(BaseAgent):
|
|||||||
belief_id,
|
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 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.
|
||||||
@@ -188,7 +191,7 @@ class UserInterruptAgent(BaseAgent):
|
|||||||
)
|
)
|
||||||
await self.send(message)
|
await self.send(message)
|
||||||
|
|
||||||
if pause:
|
if pause == "true":
|
||||||
# Send pause to VAD agent
|
# Send pause to VAD agent
|
||||||
vad_message = InternalMessage(
|
vad_message = InternalMessage(
|
||||||
to=settings.agent_settings.vad_name,
|
to=settings.agent_settings.vad_name,
|
||||||
|
|||||||
Reference in New Issue
Block a user