manager.py 821 B

123456789101112131415161718192021222324252627282930313233
  1. '''
  2. @Author : liujunshen
  3. @Ide : vscode
  4. @File : manager.py
  5. @Time : 2023/03/29 10:32:02
  6. '''
  7. from core.peripheral.factory import PeripheralHandFactory
  8. from core.peripheral.hand.base import PeripheralHandBase
  9. class PeripheralHandManager(PeripheralHandBase):
  10. """机械手主入口"""
  11. def __init__(self, device_name, init_params) -> None:
  12. peripheral_hand_factory = PeripheralHandFactory()
  13. self.client = peripheral_hand_factory.create_client(
  14. device_name, init_params)
  15. def init(self):
  16. return self.client.init()
  17. def start(self, train=None):
  18. return self.client.start(train)
  19. def stop(self):
  20. return self.client.stop()
  21. def status(self):
  22. return self.client.status()
  23. def close(self):
  24. return self.client.close()