factory.py 698 B

123456789101112131415161718192021
  1. '''
  2. @Author : liujunshen
  3. @Ide : vscode
  4. @File : peripheral_factory.py
  5. @Time : 2023/03/29 10:14:50
  6. '''
  7. from core.peripheral.hand.ruishou import RuishouClient
  8. from core.peripheral.hand.fubo_pneumatic_finger import FuboPneumaticFingerClient
  9. from core.peripheral.hand.fubo_mechanical_finger import FuboMechanicalFingerClient
  10. class PeripheralHandFactory():
  11. def create_client(self, name, init_params=None):
  12. if name == "ruishou":
  13. return RuishouClient()
  14. if name == "fubo_pneumatic_finger":
  15. return FuboPneumaticFingerClient(init_params)
  16. if name == "fubo_mechanical_finger":
  17. return FuboMechanicalFingerClient(init_params)