chore: add one endpoint fo avoid errors

This commit is contained in:
Björn Otgaar
2026-01-07 18:24:35 +01:00
parent 76dfcb23ef
commit be88323cf7
2 changed files with 6 additions and 4 deletions

View File

@@ -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.

View File

@@ -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.