Merge remote-tracking branch 'origin/dev' into demo

This commit is contained in:
Twirre Meulenbelt
2025-11-05 12:38:08 +01:00
15 changed files with 187 additions and 163 deletions

View File

@@ -5,9 +5,9 @@ import spade.agent
import zmq
from spade.agent import Agent
from spade.behaviour import CyclicBehaviour
from zmq.asyncio import Context
from control_backend.core.config import settings
from control_backend.core.zmq_context import context
from control_backend.schemas.ri_message import SpeechCommand
logger = logging.getLogger(__name__)
@@ -71,6 +71,8 @@ class RICommandAgent(Agent):
"""
logger.info("Setting up %s", self.jid)
context = Context.instance()
# To the robot
self.pubsocket = context.socket(zmq.PUB)
if self.bind:
@@ -80,7 +82,7 @@ class RICommandAgent(Agent):
# Receive internal topics regarding commands
self.subsocket = context.socket(zmq.SUB)
self.subsocket.connect(settings.zmq_settings.internal_comm_address)
self.subsocket.connect(settings.zmq_settings.internal_sub_address)
self.subsocket.setsockopt(zmq.SUBSCRIBE, b"command")
# Add behaviour to our agent