def async_daemon(self, daemon_name, wait_timeout_sec=0): """ Get a daemon asynchronous proxy. :param daemon_name: The daemon name :param wait_timeout_sec: Time to wait for the daemon to spawn :return: A thread local object of the daemon """ proxy = self.daemon(daemon_name, wait_timeout_sec) Pyro4.asyncproxy(proxy) return proxy
file_path = os.path.dirname(os.path.abspath(__file__)) root_path = os.path.abspath(os.path.join(file_path, '..')) print(root_path) sys.path.append(root_path) try: from utils.realsenseL515 import RealsenseSensor from utils.grasp_2d import Grasp2D from utils.tf_mapper import TFMapper_EyeToHand from utils.ur_servo import URServo except Exception as e: print('import utils error') raise e Pyro4.config.SERIALIZER = 'pickle' grasp_server = Pyro4.Proxy("PYRO:[email protected]:6665") Pyro4.asyncproxy(grasp_server) total_length = [] HHHH = 40 def Plan(image): print(image.shape) image = image.astype('float32') np.save('ddd.npy', image) return grasp_server.plan(image, 70) class GrapsPanler(object): CROP_START = np.array([200, 50]) CROP_SIZE = 480 SCALE = 300 / CROP_SIZE