import tempfile import threading import time from unittest import TestCase from station.control_service import StationService class Gateway: active_arm='89' def __init__(self): self.started=None;self.requests=[] def graph(self): return {'nodes':['dh_pgea'],'topics':['/gripper/states'], 'services':['/gripper/open','/gripper/close','/gripper/initialize','/dh_pgea/execute']} def publisher_count(self, topic): return 1 if topic=='/gripper/states' else 0 def states(self): elapsed=time.monotonic()-self.started if self.started else 0 moving=bool(self.started and elapsed