hex-zmq-servers 0.3.0__py3-none-any.whl → 0.3.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,8 +78,15 @@ __all__ = [
78
78
  "HexRobotHexarmServer",
79
79
  ]
80
80
 
81
+ # Check optional dependencies availability
82
+ from importlib.util import find_spec
83
+
84
+ _HAS_OPENCV = find_spec("cv2") is not None
85
+ _HAS_BERXEL = find_spec("berxel_py_wrapper") is not None
86
+ _HAS_MUJOCO = find_spec("mujoco") is not None
87
+
81
88
  # Optional: camera
82
- try:
89
+ if _HAS_OPENCV and _HAS_BERXEL:
83
90
  from .cam import HexCamBase, HexCamClientBase, HexCamServerBase
84
91
  from .cam import HexCamDummy, HexCamDummyClient, HexCamDummyServer
85
92
  from .cam import HexCamBerxel, HexCamBerxelClient, HexCamBerxelServer
@@ -107,13 +114,9 @@ try:
107
114
  "HexCamBerxelClient",
108
115
  "HexCamBerxelServer",
109
116
  ])
110
- except ImportError:
111
- # berxel_py_wrapper not installed
112
- # Install with: pip install hex_zmq_servers[berxel] or pip install hex_zmq_servers[all]
113
- pass
114
117
 
115
118
  # Optional: mujoco
116
- try:
119
+ if _HAS_OPENCV and _HAS_MUJOCO:
117
120
  from .mujoco import HexMujocoBase, HexMujocoClientBase, HexMujocoServerBase
118
121
  from .mujoco import HexMujocoArcherY6, HexMujocoArcherY6Client, HexMujocoArcherY6Server
119
122
  from .mujoco import HexMujocoE3Desktop, HexMujocoE3DesktopClient, HexMujocoE3DesktopServer
@@ -141,9 +144,5 @@ try:
141
144
  "HexMujocoE3DesktopClient",
142
145
  "HexMujocoE3DesktopServer",
143
146
  ])
144
- except ImportError:
145
- # mujoco not installed
146
- # Install with: pip install hex_zmq_servers[mujoco] or pip install hex_zmq_servers[all]
147
- pass
148
147
 
149
148
  # print("#### Thanks for using hex_zmq_servers :D ####")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hex_zmq_servers
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: HEXFELLOW ZMQ Servers
5
5
  Author-email: Dong Zhaorui <joray.dong@hexfellow.com>
6
6
  Maintainer-email: jecjune <zejun.chen@hexfellow.com>, Dong Zhaorui <joray.dong@hexfellow.com>
@@ -24,7 +24,7 @@ Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
25
  Requires-Dist: pyzmq>=27.0.1
26
26
  Requires-Dist: hex_device<1.4.0,>=1.3.1
27
- Requires-Dist: hex_robo_utils<0.2.0,>=0.1.20
27
+ Requires-Dist: hex_robo_utils<0.3.0,>=0.2.0
28
28
  Requires-Dist: dynamixel-sdk==3.8.4
29
29
  Provides-Extra: camera
30
30
  Requires-Dist: berxel_py_wrapper>=2.0; extra == "camera"
@@ -1,4 +1,4 @@
1
- hex_zmq_servers/__init__.py,sha256=gltsObhcd80K_lX7JwIdOfWcUaPP3YXd5uyOdNT9xM4,4727
1
+ hex_zmq_servers/__init__.py,sha256=1tHkUyB8TBlnCb54C9jroTYAaIkPmn8ZeHB_v6HQEb0,4702
2
2
  hex_zmq_servers/device_base.py,sha256=NGVQvLZFw3l2ZC55tHuKHLVXppEoYHt1eK_q-zm5eGA,1182
3
3
  hex_zmq_servers/hex_launch.py,sha256=opS_WwntAzV3UjOCVBo7FaLVW_dP3jlO40q-gFSBy68,17543
4
4
  hex_zmq_servers/zmq_base.py,sha256=Uwv0TDjGGJ3SplGV8BTtC2AQDxPpK47C8QYSlDFNua0,13785
@@ -93,8 +93,8 @@ hex_zmq_servers/robot/hexarm/urdf/archer_y6/gp100.urdf,sha256=4r5t5tPRD14S9G-6WX
93
93
  hex_zmq_servers/robot/hexarm/urdf/archer_y6/gp100_handle.urdf,sha256=LfoLHfcEEFj1h4QwrfMztVd2UeWKs8lmVp6gjinpvQU,7549
94
94
  hex_zmq_servers/robot/hexarm/urdf/archer_y6/gp100_p050.urdf,sha256=W2eJOrE_n2jOaSvsWCoTvd3dWzac_OzcxhkD-Ko2ENM,7550
95
95
  hex_zmq_servers/robot/hexarm/urdf/archer_y6/gp100_p050_handle.urdf,sha256=NYhfYF61vZl_EG4YPSgTXyDmDz6-Ne-ogjQO8m23znc,7547
96
- hex_zmq_servers-0.3.0.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
97
- hex_zmq_servers-0.3.0.dist-info/METADATA,sha256=kO6ZpfvfyiPjQfC57-Wb1a0cR5e6iyrrOBQqqVap2rg,4719
98
- hex_zmq_servers-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
99
- hex_zmq_servers-0.3.0.dist-info/top_level.txt,sha256=lPH1DfgMrQOe0Grh8zSZopf6LmnLvb_aStVmZ41PyAg,16
100
- hex_zmq_servers-0.3.0.dist-info/RECORD,,
96
+ hex_zmq_servers-0.3.1.dist-info/licenses/LICENSE,sha256=QwcOLU5TJoTeUhuIXzhdCEEDDvorGiC6-3YTOl4TecE,11356
97
+ hex_zmq_servers-0.3.1.dist-info/METADATA,sha256=XHBrriN1t02jX6QLlTXTqOPocKgQSRurSzT-QhBBrX0,4718
98
+ hex_zmq_servers-0.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
99
+ hex_zmq_servers-0.3.1.dist-info/top_level.txt,sha256=lPH1DfgMrQOe0Grh8zSZopf6LmnLvb_aStVmZ41PyAg,16
100
+ hex_zmq_servers-0.3.1.dist-info/RECORD,,