bob_central.swarm_coordinator_node

swarm_coordinator_node.py - Eva’s ROS 2 Swarm Coordinator Node.

Integrated with stealth mesh routing, Qdrant distributed peer registry, and skill task negotiation protocol for self-organizing task allocation.

Topics:

/eva/swarm/registry (std_msgs/String) - Full skill registry snapshot /eva/swarm/heartbeat (std_msgs/String) - Periodic health beacon /eva/swarm/announce (std_msgs/String) - Incoming peer announcements /eva/swarm/route (std_msgs/String) - Onion-routed message delivery /eva/swarm/task_bid (std_msgs/String) - Task negotiation bids /eva/swarm/task_award (std_msgs/String) - Task award assignments

Attributes

SKILL_BASE

QDRANT_URL

PEER_COLLECTION

TASK_COLLECTION

Classes

StealthMeshRouter

Decentralized stealth mesh routing.

QdrantPeerRegistry

Distributed peer registry backed by Qdrant.

TaskNegotiator

Skill-to-skill task negotiation protocol.

SwarmCoordinatorNode

Dedicated ROS 2 node for Eva's swarm coordination.

Functions

main([args])

Module Contents

bob_central.swarm_coordinator_node.SKILL_BASE = '/ros2_ws/src/bob_central/skills'
bob_central.swarm_coordinator_node.QDRANT_URL = 'http://qdrant:6333'
bob_central.swarm_coordinator_node.PEER_COLLECTION = 'peers'
bob_central.swarm_coordinator_node.TASK_COLLECTION = 'tasks'
class bob_central.swarm_coordinator_node.StealthMeshRouter(node_name: str = 'eva_swarm_router')

Decentralized stealth mesh routing.

node_name = 'eva_swarm_router'
peer_id = ''
peers
routes
relay_table
identity_rotation_interval = 300
_last_rotation
_generate_peer_id() str
rotate_identity()
register_peer(peer_id: str, address: str = '', is_relay: bool = False)
build_onion_path(destination: str) dict | None
get_status() dict
class bob_central.swarm_coordinator_node.QdrantPeerRegistry(collection: str = PEER_COLLECTION)

Distributed peer registry backed by Qdrant.

collection = 'peers'
base_url = 'http://qdrant:6333'
_ensure_collection()
save_peers(peers: dict)
load_peers() dict
class bob_central.swarm_coordinator_node.TaskNegotiator

Skill-to-skill task negotiation protocol.

active_tasks
pending_bids
awarded_tasks
task_counter = 0
create_task(task_type: str, description: str, required_capability: str = '', priority: int = 5) str

Create a new task for negotiation.

submit_bid(task_id: str, bidder_id: str, confidence: float = 0.5, load: float = 0.0) bool

Submit a bid for a task.

evaluate_bids(task_id: str) str | None

Evaluate bids and award task to best bidder.

complete_task(task_id: str) bool

Mark a task as completed.

get_status() dict
class bob_central.swarm_coordinator_node.SwarmCoordinatorNode

Bases: rclpy.node.Node

Dedicated ROS 2 node for Eva’s swarm coordination.

registry_pub
heartbeat_pub
route_pub
task_bid_pub
task_award_pub
security_pub
diag_pub
allowed_protocols = ['/noise', '/ipfs/kad/1.0.0', '/multistream/1.0.0']
skill_registry
peers
registry
router
negotiator
discover_skills()
publish_registry()
publish_heartbeat()
publish_diagnostics()

Publish swarm health as ROS 2 diagnostics.

persist_peers()
evaluate_open_tasks()

Periodically evaluate pending bids and award tasks.

property active_tasks
announce_callback(msg)
route_callback(msg)
task_bid_callback(msg)

Handle incoming task bids.

task_award_callback(msg)

Handle task award acknowledgments.

scout_report_callback(msg)

Monitor scout reports for security-relevant events.

rotate_identity()
bob_central.swarm_coordinator_node.main(args=None)