#!/usr/bin/env python

from pyrois_common import HRI_Engine_sample
from multiprocessing import Process
import time

# setup main HRI engine and sub HRI Engines
engine_profile = 'engine_profile/engine_profile_gazebo_multi'
client_info = 'client_info_gazebo_multi'
ps = [
    Process(target=HRI_Engine_sample.test_engine, args=(8000, engine_profile, client_info, None, None)),
    Process(target=HRI_Engine_sample.test_engine,args=(8010, engine_profile, client_info, 'urn:x-rois:def:HRIEngine:Kyutech::robot1', None)),
    Process(target=HRI_Engine_sample.test_engine, args=(8020,engine_profile, client_info, 'urn:x-rois:def:HRIEngine:Kyutech::robot2', None)),
    Process(target=HRI_Engine_sample.test_engine,args=(8030,engine_profile, client_info, 'urn:x-rois:def:HRIEngine:Kyutech::robot3', None))
    ]

for x in ps[1:]:
    x.start()

time.sleep(3)

ps[0].start()

while True:
    time.sleep(60)
