Skip to content

kth-social-robotics/multisensoryprocessing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

There are three main components to the multi sensory processing framework named farmi.

There are publishers, which publish data; there are subscribers which subscribe to data and there is a directory service where publishers register themselves so that subscribers can find them.

Below a minimal example is shown:

directory_service.py (or just run farmi-server)

from farmi import DirectoryService
ds = DirectoryService()
ds.listen()

receiver.py

from farmi import Subscriber

def fn(topic, time_, msg):
    print(topic, time_, msg)

s = Subscriber('some_topic', fn)
s.listen()

sender.py

import time
from farmi import Publisher
pub = Publisher('some_topic')
time.sleep(1)

for i in range(10):
    pub.send((i, "hello!"))

pub.close()

Releases

No releases published

Packages

No packages published