wujihandpy 1.0.0b2__cp313-cp313-win_amd64.whl → 1.0.0b3.dev1__cp313-cp313-win_amd64.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.

Potentially problematic release.


This version of wujihandpy might be problematic. Click here for more details.

Binary file
wujihandpy/_version.py CHANGED
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '1.0.0b2'
32
- __version_tuple__ = version_tuple = (1, 0, 0, 'b2')
31
+ __version__ = version = '1.0.0b3.dev1'
32
+ __version_tuple__ = version_tuple = (1, 0, 0, 'b3', 'dev1')
33
33
 
34
- __commit_id__ = commit_id = 'g513ffd446'
34
+ __commit_id__ = commit_id = 'g0261b518d'
@@ -0,0 +1,2 @@
1
+ Version: 1.11.2
2
+ Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ngoqgrb4\\cp313-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '--add-path', 'C:/vcpkg/installed/x64-windows/bin', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ngoqgrb4\\cp313-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ngoqgrb4\\cp313-win_amd64\\built_wheel\\wujihandpy-1.0.0b3.dev1-cp313-cp313-win_amd64.whl']
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: wujihandpy
3
- Version: 1.0.0b2
3
+ Version: 1.0.0b3.dev1
4
4
  Summary: Python bindings for WujiHandCpp
5
5
  Author-Email: Zihan Qin <zihanqin2048@gmail.com>
6
6
  Maintainer-Email: Wuji Technology <support@pan-motor.com>
@@ -117,8 +117,8 @@ hand = wujihandpy.Hand()
117
117
  ### 读数据
118
118
 
119
119
  ```python
120
- def read_<dataname>(self) -> np.<datatype>
121
- def read_<dataname>(self) -> np.array<datatype> # For bulk-read
120
+ def read_<dataname>(self) -> datatype
121
+ def read_<dataname>(self) -> np.ndarray[datatype] # For bulk-read
122
122
  ```
123
123
 
124
124
  所有可使用的数据均定义在 `wujihandpy/_core.pyi` 中。
@@ -134,7 +134,7 @@ time = hand.read_system_time()
134
134
  例如,读取第1个手指(食指),第0个关节的当前位置数据:
135
135
 
136
136
  ```python
137
- position = hand.finger(1).joint(0).read_joint_position()
137
+ position = hand.finger(1).joint(0).read_joint_actual_position()
138
138
  ```
139
139
 
140
140
  关节角度为 `np.float64` 类型,单位为弧度,零点和正方向与 [URDF文件](https://github.com/Wuji-Technology-Co-Ltd/wujihand-urdf) 中定义的相同。
@@ -144,7 +144,7 @@ position = hand.finger(1).joint(0).read_joint_position()
144
144
  例如,以下指令读取整手所有(20个)关节的当前位置数据:
145
145
 
146
146
  ```python
147
- positions = hand.read_joint_position()
147
+ positions = hand.read_joint_actual_position()
148
148
  ```
149
149
 
150
150
  进行批量读时,函数返回包含所有数据的 `np.ndarray[np.float64]`:
@@ -165,21 +165,21 @@ positions = hand.read_joint_position()
165
165
  写数据拥有类似的 API,但多了一个参数用于传递目标值:
166
166
 
167
167
  ```python
168
- def write_<dataname>(self, np.<datatype>)
169
- def write_<dataname>(self, np.array<datatype>) # For bulk-write
168
+ def write_<dataname>(self, datatype)
169
+ def write_<dataname>(self, np.ndarray[datatype]) # For bulk-write
170
170
  ```
171
171
 
172
172
  例如,写入单个关节的目标位置数据:
173
173
 
174
174
  ```python
175
- hand.finger(1).joint(0).write_joint_control_position(np.float64(0.8))
175
+ hand.finger(1).joint(0).write_joint_target_position(0.8)
176
176
  ```
177
177
 
178
178
  各关节的合法角度范围可通过以下 API 获取:
179
179
 
180
180
  ```python
181
- upper = (Hand | Finger | Joint).read_joint_upper_limit()
182
- lower = (Hand | Finger | Joint).read_joint_lower_limit()
181
+ upper = < Hand / Finger / Joint >.read_joint_upper_limit()
182
+ lower = < Hand / Finger / Joint >.read_joint_lower_limit()
183
183
  ```
184
184
 
185
185
  若写入的角度超出合法范围,会被自动限幅至最高/最低值。
@@ -187,13 +187,13 @@ lower = (Hand | Finger | Joint).read_joint_lower_limit()
187
187
  **批量写**数据也是可行的,例如,批量为第一个手指写入目标位置数据:
188
188
 
189
189
  ```python
190
- hand.finger(1).write_joint_control_position(np.float64(0.8))
190
+ hand.finger(1).write_joint_target_position(0.8)
191
191
  ```
192
192
 
193
193
  如果每个关节的目标值不同,可以传入一个包含所有目标值的 `np.array`:
194
194
 
195
195
  ```python
196
- hand.finger(1).write_joint_control_position(
196
+ hand.finger(1).write_joint_target_position(
197
197
  np.array(
198
198
  # J1 J2 J3 J4
199
199
  [0.8, 0.0, 0.8, 0.8],
@@ -209,10 +209,10 @@ hand.finger(1).write_joint_control_position(
209
209
  读写函数均有对应的异步版本,函数名以 `_async` 作为后缀。
210
210
 
211
211
  ``` python
212
- async def read_<dataname>_async(self) -> np.<datatype>
213
- async def read_<dataname>_async(self) -> np.array<datatype> # For bulk-read
214
- async def write_<dataname>_async(self, np.<datatype>)
215
- async def write_<dataname>_async(self, np.array<datatype>) # For bulk-write
212
+ async def read_<dataname>_async(self) -> datatype
213
+ async def read_<dataname>_async(self) -> np.ndarray[datatype] # For bulk-read
214
+ async def write_<dataname>_async(self, datatype)
215
+ async def write_<dataname>_async(self, np.ndarray[datatype]) # For bulk-write
216
216
  ```
217
217
 
218
218
  异步接口需 `await`;等待期间不阻塞线程/事件循环,返回时保证读/写已经成功。
@@ -224,8 +224,8 @@ async def write_<dataname>_async(self, np.array<datatype>) # For bulk-write
224
224
  ```python
225
225
  def read_<dataname>_unchecked(self) -> None
226
226
  def read_<dataname>_unchecked(self) -> None # For bulk-read
227
- def write_<dataname>_unchecked(self, np.<datatype>)
228
- def write_<dataname>_unchecked(self, np.array<datatype>) # For bulk-write
227
+ def write_<dataname>_unchecked(self, datatype)
228
+ def write_<dataname>_unchecked(self, np.ndarray[datatype]) # For bulk-write
229
229
  ```
230
230
 
231
231
  Unchecked 函数总是立即返回,不会阻塞,通常用于对实时性要求较高的场景。
@@ -235,27 +235,25 @@ Unchecked 函数总是立即返回,不会阻塞,通常用于对实时性要
235
235
  如果希望获取以往读/写的结果,可以使用 `get` 系列函数:
236
236
 
237
237
  ```python
238
- def get_<dataname>(self) -> np.<datatype>
239
- def get_<dataname>(self) -> np.array<datatype> # For bulk-read
238
+ def get_<dataname>(self) -> datatype
239
+ def get_<dataname>(self) -> np.ndarray[datatype] # For bulk-read
240
240
  ```
241
241
 
242
242
  `get` 系列函数同样不会阻塞,它总是立即返回最近一次读取到的数据,无论该数据来自 `read`、`async-read` 还是 `read-unchecked`。
243
243
 
244
244
  如果尚未请求过该数据,或请求尚未成功,`get` 函数的返回值是未定义的(通常为0)。
245
245
 
246
- ### PDO 写
246
+ ### 实时控制
247
247
 
248
- 默认的读/写方式均带有缓冲池,积攒一段数据后才进行传输,最高读/写频率无法超过 100Hz。
248
+ 默认的读/写方式均带有缓冲池,积攒一段时间数据后才进行传输,最高读/写频率无法超过 100Hz。
249
249
 
250
- 对于需要高频率实时控制关节位置(如 1kHz)的场景,需使用 PDO 非阻塞写接口。
250
+ 对于需要流畅控制关节位置的场景,需使用 realtime_controller。
251
251
 
252
- ```python
253
- hand.pdo_write_unchecked(np.float64(0.8))
254
- # 或按 5x4 结构批量发送:
255
- # hand.pdo_write_unchecked(np.array([...], dtype=np.float64))
256
- ```
252
+ 具体的控制示例可见 [example](example) 目录:
257
253
 
258
- PDO 启用前需特别配置,见 [example/4.pdo.py](example/4.pdo.py)
254
+ 单向写:[realtime.py](example/4.realtime.py)
255
+
256
+ 双向读/写:[realtime_duplex.py](example/5.realtime_duplex.py)
259
257
 
260
258
  ## 性能与优化
261
259
 
@@ -263,6 +261,8 @@ WujihandPy 在充分保证易用性的同时,尽可能优化了性能与效率
263
261
 
264
262
  我们强烈建议优先使用批量读/写以最大限度地发挥性能。
265
263
 
264
+ 对于需要流畅控制关节位置的场景,请务必使用 realtime_controller。
265
+
266
266
  ## 许可证
267
267
 
268
268
  本项目采用 MIT 许可证,详情见 [LICENSE](LICENSE) 文件。
@@ -0,0 +1,13 @@
1
+ wujihandpy/_core.cp313-win_amd64.pyd,sha256=8nwpMwipMv64qyJ31WWmkr5j4Ntqnd8PJECFAm-0vHw,677376
2
+ wujihandpy/_version.py,sha256=QTc8v5aTUhHkk86QUViph0MTeE6hup0H1UmfvxwuLr8,767
3
+ wujihandpy/__init__.py,sha256=vPhIatTFj099nPHxR0ifTFN4gKRt_9dstEgA7U3jR9E,503
4
+ wujihandpy/_core/filter.pyi,sha256=bhf3_lTgyf0BeVhp4TqUw0nJgoE0f-kyzw7vJrt67nI,235
5
+ wujihandpy/_core/__init__.pyi,sha256=Hjc7KVpIPrKhBp8kwgHhfkmlOCspkUeAjatB7mA9Vu8,22344
6
+ wujihandpy-1.0.0b3.dev1.dist-info/DELVEWHEEL,sha256=50B3pRUTPs08yLgsIHDEfTtLgm530jG5l9r39GspPc0,462
7
+ wujihandpy-1.0.0b3.dev1.dist-info/METADATA,sha256=t7cAKr4ORcEnjhyqDVeQFYV9SH9KJhCbH3N5Z3dBjjk,8036
8
+ wujihandpy-1.0.0b3.dev1.dist-info/RECORD,,
9
+ wujihandpy-1.0.0b3.dev1.dist-info/WHEEL,sha256=vkL3wTIkhjZa3RmEXX20hldNp6Q8qtwRjrXW6K5sw_Q,106
10
+ wujihandpy-1.0.0b3.dev1.dist-info/licenses/LICENSE,sha256=aWRV7TIHNfIAV58Abtu5ubNfqOHUeANdqg_QXb99nto,1093
11
+ wujihandpy.libs/libusb-1.0-11785d8f05c60f37a70ddf7d550c5f83.dll,sha256=EXhdjwXGDzenDd99VQxfg0UT_ONzBepqY0Kn2HLbfPM,158208
12
+ wujihandpy.libs/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll,sha256=pMIim9wqKmMKzcCVtNhgCOXD47x3cxdDVPPaT1vrnN4,575056
13
+ wujihandpy.libs/msvcp140_atomic_wait-eb238a7437cff8f49c01cc67fd035163.dll,sha256=aR3icdyYE_-F-pRwzFoq8K2INB8tg4IhD8HFdLrgehc,29696
@@ -1,2 +0,0 @@
1
- Version: 1.11.2
2
- Arguments: ['C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ct2cjf9a\\cp313-win_amd64\\build\\venv\\Scripts\\delvewheel', 'repair', '--add-path', 'C:/vcpkg/installed/x64-windows/bin', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ct2cjf9a\\cp313-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-ct2cjf9a\\cp313-win_amd64\\built_wheel\\wujihandpy-1.0.0b2-cp313-cp313-win_amd64.whl']
@@ -1,13 +0,0 @@
1
- wujihandpy/_core.cp313-win_amd64.pyd,sha256=ejlTpYhXO47E0jXrMh9I04Pknks_FFBmYr_SvsXrgAM,481280
2
- wujihandpy/_version.py,sha256=phWv9H1vMb90k717zR9u0NBCL6xnM4nL-eTMgUjlewc,754
3
- wujihandpy/__init__.py,sha256=vPhIatTFj099nPHxR0ifTFN4gKRt_9dstEgA7U3jR9E,503
4
- wujihandpy/_core/filter.pyi,sha256=bhf3_lTgyf0BeVhp4TqUw0nJgoE0f-kyzw7vJrt67nI,235
5
- wujihandpy/_core/__init__.pyi,sha256=Hjc7KVpIPrKhBp8kwgHhfkmlOCspkUeAjatB7mA9Vu8,22344
6
- wujihandpy-1.0.0b2.dist-info/DELVEWHEEL,sha256=2A2ath_IF9jMxuWQpeztrVYW6xhl7PU-i6fCyZc3gOk,457
7
- wujihandpy-1.0.0b2.dist-info/METADATA,sha256=HtQTe6nBxCqCjrfHKPqy0QN8rnW5oKHI8k8DLgSTMEE,8039
8
- wujihandpy-1.0.0b2.dist-info/RECORD,,
9
- wujihandpy-1.0.0b2.dist-info/WHEEL,sha256=vkL3wTIkhjZa3RmEXX20hldNp6Q8qtwRjrXW6K5sw_Q,106
10
- wujihandpy-1.0.0b2.dist-info/licenses/LICENSE,sha256=aWRV7TIHNfIAV58Abtu5ubNfqOHUeANdqg_QXb99nto,1093
11
- wujihandpy.libs/libusb-1.0-f6b00327b2d35f4dd383e7011be81e7c.dll,sha256=9rADJ7LTX03Tg-cBG-gefEhCZxkjmiDnpoohVBFfE3A,158208
12
- wujihandpy.libs/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll,sha256=pMIim9wqKmMKzcCVtNhgCOXD47x3cxdDVPPaT1vrnN4,575056
13
- wujihandpy.libs/msvcp140_atomic_wait-eb238a7437cff8f49c01cc67fd035163.dll,sha256=aR3icdyYE_-F-pRwzFoq8K2INB8tg4IhD8HFdLrgehc,29696