spherical-wrist 0.0.1__tar.gz

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.
Files changed (74) hide show
  1. spherical_wrist-0.0.1/.github/workflows/release-artifacts.yml +56 -0
  2. spherical_wrist-0.0.1/.github/workflows/release.yml +388 -0
  3. spherical_wrist-0.0.1/.gitignore +13 -0
  4. spherical_wrist-0.0.1/Cargo.lock +6613 -0
  5. spherical_wrist-0.0.1/Cargo.toml +17 -0
  6. spherical_wrist-0.0.1/LICENSE +33 -0
  7. spherical_wrist-0.0.1/PKG-INFO +228 -0
  8. spherical_wrist-0.0.1/README.md +185 -0
  9. spherical_wrist-0.0.1/docs/api-reference.md +222 -0
  10. spherical_wrist-0.0.1/docs/concepts.md +79 -0
  11. spherical_wrist-0.0.1/docs/development-maturin.md +71 -0
  12. spherical_wrist-0.0.1/docs/index.md +30 -0
  13. spherical_wrist-0.0.1/docs/installation.md +59 -0
  14. spherical_wrist-0.0.1/docs/jacobian.md +237 -0
  15. spherical_wrist-0.0.1/docs/meshes-and-collisions.md +115 -0
  16. spherical_wrist-0.0.1/docs/path-planning.md +113 -0
  17. spherical_wrist-0.0.1/docs/quickstart.md +91 -0
  18. spherical_wrist-0.0.1/docs/robots.md +79 -0
  19. spherical_wrist-0.0.1/docs/transforms-and-units.md +118 -0
  20. spherical_wrist-0.0.1/docs/troubleshooting.md +94 -0
  21. spherical_wrist-0.0.1/docs/visualization.md +51 -0
  22. spherical_wrist-0.0.1/pyproject.toml +75 -0
  23. spherical_wrist-0.0.1/python/examples/README.md +73 -0
  24. spherical_wrist-0.0.1/python/examples/_common.py +197 -0
  25. spherical_wrist-0.0.1/python/examples/assets/flag.ply +0 -0
  26. spherical_wrist-0.0.1/python/examples/assets/flag.stl +0 -0
  27. spherical_wrist-0.0.1/python/examples/assets/object.stl +0 -0
  28. spherical_wrist-0.0.1/python/examples/assets/staubli/LICENSE +195 -0
  29. spherical_wrist-0.0.1/python/examples/assets/staubli/rx160/base_link.stl +0 -0
  30. spherical_wrist-0.0.1/python/examples/assets/staubli/rx160/link_1.stl +0 -0
  31. spherical_wrist-0.0.1/python/examples/assets/staubli/rx160/link_2.stl +0 -0
  32. spherical_wrist-0.0.1/python/examples/assets/staubli/rx160/link_3.stl +0 -0
  33. spherical_wrist-0.0.1/python/examples/assets/staubli/rx160/link_4.stl +0 -0
  34. spherical_wrist-0.0.1/python/examples/assets/staubli/rx160/link_5.stl +0 -0
  35. spherical_wrist-0.0.1/python/examples/assets/staubli/rx160/link_6.stl +0 -0
  36. spherical_wrist-0.0.1/python/examples/basic.py +50 -0
  37. spherical_wrist-0.0.1/python/examples/basic_readme.py +28 -0
  38. spherical_wrist-0.0.1/python/examples/cartesian_stroke.py +141 -0
  39. spherical_wrist-0.0.1/python/examples/complete_visible_robot.py +40 -0
  40. spherical_wrist-0.0.1/python/examples/constraints.py +44 -0
  41. spherical_wrist-0.0.1/python/examples/frame.py +97 -0
  42. spherical_wrist-0.0.1/python/examples/jacobian.py +39 -0
  43. spherical_wrist-0.0.1/python/examples/parallelogram.py +79 -0
  44. spherical_wrist-0.0.1/python/examples/path_planning_rrt.py +49 -0
  45. spherical_wrist-0.0.1/python/examples/readme_intro.py +36 -0
  46. spherical_wrist-0.0.1/python/examples/tool_and_base.py +31 -0
  47. spherical_wrist-0.0.1/python/spherical_wrist/__init__.py +1229 -0
  48. spherical_wrist-0.0.1/python/spherical_wrist/_internal.pyi +422 -0
  49. spherical_wrist-0.0.1/python/spherical_wrist/py.typed +1 -0
  50. spherical_wrist-0.0.1/python/tests/test_constraints.py +75 -0
  51. spherical_wrist-0.0.1/python/tests/test_error_boundaries.py +110 -0
  52. spherical_wrist-0.0.1/python/tests/test_intro_api.py +341 -0
  53. spherical_wrist-0.0.1/python/tests/test_jacobian.py +123 -0
  54. spherical_wrist-0.0.1/python/tests/test_kinematics_trait.py +66 -0
  55. spherical_wrist-0.0.1/python/tests/test_kinematics_with_shape.py +119 -0
  56. spherical_wrist-0.0.1/python/tests/test_mesh.py +55 -0
  57. spherical_wrist-0.0.1/python/tests/test_path_plan.py +179 -0
  58. spherical_wrist-0.0.1/python/tests/test_visualization.py +130 -0
  59. spherical_wrist-0.0.1/scripts/check_release_artifacts.py +645 -0
  60. spherical_wrist-0.0.1/src/annotated_joints.rs +40 -0
  61. spherical_wrist-0.0.1/src/cartesian_planner.rs +186 -0
  62. spherical_wrist-0.0.1/src/constraints.rs +94 -0
  63. spherical_wrist-0.0.1/src/frame.rs +62 -0
  64. spherical_wrist-0.0.1/src/helpers.rs +593 -0
  65. spherical_wrist-0.0.1/src/jacobian.rs +124 -0
  66. spherical_wrist-0.0.1/src/kinematic_model.rs +159 -0
  67. spherical_wrist-0.0.1/src/kinematics_with_shape.rs +318 -0
  68. spherical_wrist-0.0.1/src/lib.rs +124 -0
  69. spherical_wrist-0.0.1/src/mesh.rs +158 -0
  70. spherical_wrist-0.0.1/src/parallelogram.rs +73 -0
  71. spherical_wrist-0.0.1/src/robot.rs +359 -0
  72. spherical_wrist-0.0.1/src/rrt_planner.rs +117 -0
  73. spherical_wrist-0.0.1/src/safety_distances.rs +94 -0
  74. spherical_wrist-0.0.1/src/visualization.rs +115 -0
@@ -0,0 +1,56 @@
1
+ name: Release Artifact Checks
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - master
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ env:
14
+ MATURIN_VERSION: "1.12.3"
15
+
16
+ jobs:
17
+ release-artifacts:
18
+ name: Build and test release artifacts
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v4
22
+
23
+ - name: Set up Python
24
+ uses: actions/setup-python@v6
25
+ with:
26
+ python-version: "3.12"
27
+
28
+ - name: Install release-check dependencies
29
+ run: |
30
+ python -m pip install --upgrade pip
31
+ python -m pip install "maturin[patchelf]==${MATURIN_VERSION}" packaging pytest twine
32
+
33
+ - name: Install Linux native build dependencies
34
+ run: |
35
+ sudo apt-get update
36
+ sudo apt-get install -y --no-install-recommends \
37
+ g++ \
38
+ pkg-config \
39
+ libx11-dev \
40
+ libasound2-dev \
41
+ libudev-dev \
42
+ libxkbcommon-x11-0 \
43
+ libwayland-dev \
44
+ libxkbcommon-dev
45
+
46
+ - name: Build and check release artifacts
47
+ run: |
48
+ python scripts/check_release_artifacts.py build --compatibility linux
49
+
50
+ - name: Upload release artifact report
51
+ uses: actions/upload-artifact@v4
52
+ if: always()
53
+ with:
54
+ name: release-artifact-report
55
+ path: target/release-check/report/
56
+ if-no-files-found: ignore
@@ -0,0 +1,388 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "*.*.*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ env:
13
+ MATURIN_VERSION: "1.12.3"
14
+ MATURIN_BUILD_ARGS: >-
15
+ --release
16
+ --locked
17
+ --out dist
18
+ --compatibility pypi
19
+
20
+ jobs:
21
+ preflight:
22
+ name: Release preflight
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - uses: actions/checkout@v4
26
+
27
+ - name: Set up Python
28
+ uses: actions/setup-python@v6
29
+ with:
30
+ python-version: "3.12"
31
+
32
+ - name: Verify tag matches Cargo version
33
+ if: startsWith(github.ref, 'refs/tags/')
34
+ shell: python
35
+ env:
36
+ RELEASE_TAG: ${{ github.ref_name }}
37
+ run: |
38
+ import os
39
+ import tomllib
40
+ from pathlib import Path
41
+
42
+ with Path("Cargo.toml").open("rb") as file:
43
+ version = tomllib.load(file)["package"]["version"]
44
+
45
+ expected = version
46
+ actual = os.environ["RELEASE_TAG"]
47
+
48
+ if actual != expected:
49
+ raise SystemExit(
50
+ f"Release tag {actual!r} does not match package version {expected!r}"
51
+ )
52
+
53
+ linux-x86_64:
54
+ name: manylinux x86_64 py${{ matrix.python-version }}
55
+ needs: preflight
56
+ runs-on: ubuntu-latest
57
+ strategy:
58
+ fail-fast: false
59
+ matrix:
60
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
61
+ steps:
62
+ - uses: actions/checkout@v4
63
+
64
+ - name: Set up Python
65
+ uses: actions/setup-python@v6
66
+ with:
67
+ python-version: ${{ matrix.python-version }}
68
+
69
+ - name: Build wheel
70
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b
71
+ with:
72
+ maturin-version: v${{ env.MATURIN_VERSION }}
73
+ target: x86_64
74
+ manylinux: "2014"
75
+ before-script-linux: >-
76
+ yum install -y
77
+ gcc-c++
78
+ pkgconfig
79
+ libX11-devel
80
+ alsa-lib-devel
81
+ systemd-devel
82
+ wayland-devel
83
+ libxkbcommon-devel
84
+ args: ${{ env.MATURIN_BUILD_ARGS }} --auditwheel repair -i python${{ matrix.python-version }}
85
+
86
+ - name: Install and import wheel
87
+ shell: python
88
+ run: |
89
+ import os
90
+ import subprocess
91
+ import sys
92
+ import tempfile
93
+
94
+ dist = os.path.join(os.environ["GITHUB_WORKSPACE"], "dist")
95
+
96
+ subprocess.check_call([
97
+ sys.executable, "-m", "pip", "install",
98
+ "numpy>=1.26.4", "scipy>=1.16.0",
99
+ ])
100
+ subprocess.check_call([
101
+ sys.executable, "-m", "pip", "install",
102
+ "--no-index",
103
+ "--no-deps",
104
+ "--find-links", dist,
105
+ "spherical-wrist",
106
+ ])
107
+
108
+ with tempfile.TemporaryDirectory() as directory:
109
+ subprocess.check_call([
110
+ sys.executable,
111
+ "-c",
112
+ "import spherical_wrist; import spherical_wrist._internal",
113
+ ], cwd=directory)
114
+
115
+ - name: Upload wheels
116
+ uses: actions/upload-artifact@v4
117
+ with:
118
+ name: wheels-manylinux-x86_64-py${{ matrix.python-version }}
119
+ path: dist/*.whl
120
+ if-no-files-found: error
121
+
122
+ windows-x86_64:
123
+ name: Windows x86_64 py${{ matrix.python-version }}
124
+ needs: preflight
125
+ runs-on: windows-latest
126
+ strategy:
127
+ fail-fast: false
128
+ matrix:
129
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
130
+ steps:
131
+ - uses: actions/checkout@v4
132
+
133
+ - name: Set up Python
134
+ uses: actions/setup-python@v6
135
+ with:
136
+ python-version: ${{ matrix.python-version }}
137
+
138
+ - name: Build wheel
139
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b
140
+ with:
141
+ maturin-version: v${{ env.MATURIN_VERSION }}
142
+ target: x86_64-pc-windows-msvc
143
+ args: ${{ env.MATURIN_BUILD_ARGS }} -i python
144
+
145
+ - name: Install and import wheel
146
+ shell: python
147
+ run: |
148
+ import os
149
+ import subprocess
150
+ import sys
151
+ import tempfile
152
+
153
+ dist = os.path.join(os.environ["GITHUB_WORKSPACE"], "dist")
154
+
155
+ subprocess.check_call([
156
+ sys.executable, "-m", "pip", "install",
157
+ "numpy>=1.26.4", "scipy>=1.16.0",
158
+ ])
159
+ subprocess.check_call([
160
+ sys.executable, "-m", "pip", "install",
161
+ "--no-index",
162
+ "--no-deps",
163
+ "--find-links", dist,
164
+ "spherical-wrist",
165
+ ])
166
+
167
+ with tempfile.TemporaryDirectory() as directory:
168
+ subprocess.check_call([
169
+ sys.executable,
170
+ "-c",
171
+ "import spherical_wrist; import spherical_wrist._internal",
172
+ ], cwd=directory)
173
+
174
+ - name: Upload wheels
175
+ uses: actions/upload-artifact@v4
176
+ with:
177
+ name: wheels-windows-x86_64-py${{ matrix.python-version }}
178
+ path: dist/*.whl
179
+ if-no-files-found: error
180
+
181
+ macos:
182
+ name: macOS ${{ matrix.platform.arch }} py${{ matrix.python-version }}
183
+ needs: preflight
184
+ runs-on: ${{ matrix.platform.os }}
185
+ strategy:
186
+ fail-fast: false
187
+ matrix:
188
+ python-version: ["3.11", "3.12", "3.13", "3.14"]
189
+ platform:
190
+ - arch: x86_64
191
+ os: macos-15-intel
192
+ target: x86_64-apple-darwin
193
+ - arch: arm64
194
+ os: macos-15
195
+ target: aarch64-apple-darwin
196
+ steps:
197
+ - uses: actions/checkout@v4
198
+
199
+ - name: Set up Python
200
+ uses: actions/setup-python@v6
201
+ with:
202
+ python-version: ${{ matrix.python-version }}
203
+
204
+ - name: Build wheel
205
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b
206
+ with:
207
+ maturin-version: v${{ env.MATURIN_VERSION }}
208
+ target: ${{ matrix.platform.target }}
209
+ args: ${{ env.MATURIN_BUILD_ARGS }} -i python
210
+
211
+ - name: Install and import wheel
212
+ shell: python
213
+ run: |
214
+ import os
215
+ import subprocess
216
+ import sys
217
+ import tempfile
218
+
219
+ dist = os.path.join(os.environ["GITHUB_WORKSPACE"], "dist")
220
+
221
+ subprocess.check_call([
222
+ sys.executable, "-m", "pip", "install",
223
+ "numpy>=1.26.4", "scipy>=1.16.0",
224
+ ])
225
+ subprocess.check_call([
226
+ sys.executable, "-m", "pip", "install",
227
+ "--no-index",
228
+ "--no-deps",
229
+ "--find-links", dist,
230
+ "spherical-wrist",
231
+ ])
232
+
233
+ with tempfile.TemporaryDirectory() as directory:
234
+ subprocess.check_call([
235
+ sys.executable,
236
+ "-c",
237
+ "import spherical_wrist; import spherical_wrist._internal",
238
+ ], cwd=directory)
239
+
240
+ - name: Upload wheels
241
+ uses: actions/upload-artifact@v4
242
+ with:
243
+ name: wheels-macos-${{ matrix.platform.arch }}-py${{ matrix.python-version }}
244
+ path: dist/*.whl
245
+ if-no-files-found: error
246
+
247
+ sdist:
248
+ name: sdist
249
+ needs: preflight
250
+ runs-on: ubuntu-latest
251
+ steps:
252
+ - uses: actions/checkout@v4
253
+
254
+ - name: Set up Python
255
+ uses: actions/setup-python@v6
256
+ with:
257
+ python-version: "3.12"
258
+
259
+ - name: Build sdist
260
+ uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b
261
+ with:
262
+ maturin-version: v${{ env.MATURIN_VERSION }}
263
+ command: sdist
264
+ args: --out dist
265
+
266
+ - name: Install Linux native build dependencies
267
+ run: |
268
+ sudo apt-get update
269
+ sudo apt-get install -y --no-install-recommends \
270
+ g++ \
271
+ pkg-config \
272
+ libx11-dev \
273
+ libasound2-dev \
274
+ libudev-dev \
275
+ libxkbcommon-x11-0 \
276
+ libwayland-dev \
277
+ libxkbcommon-dev
278
+
279
+ - name: Prove sdist builds
280
+ run: |
281
+ python -m pip install --upgrade pip
282
+ python -m pip install "maturin[patchelf]==${MATURIN_VERSION}"
283
+ python -m pip wheel --no-build-isolation --no-deps --wheel-dir sdist-wheelhouse dist/*.tar.gz
284
+
285
+ - name: Upload sdist
286
+ uses: actions/upload-artifact@v4
287
+ with:
288
+ name: sdist
289
+ path: dist/*.tar.gz
290
+ if-no-files-found: error
291
+
292
+ release-artifact-check:
293
+ name: Release artifact check
294
+ needs:
295
+ - linux-x86_64
296
+ - windows-x86_64
297
+ - macos
298
+ - sdist
299
+ runs-on: ubuntu-latest
300
+ steps:
301
+ - uses: actions/checkout@v4
302
+
303
+ - name: Set up Python
304
+ uses: actions/setup-python@v6
305
+ with:
306
+ python-version: "3.12"
307
+
308
+ - name: Install release-check dependencies
309
+ run: |
310
+ python -m pip install --upgrade pip
311
+ python -m pip install packaging pytest twine
312
+
313
+ - name: Download distributions
314
+ uses: actions/download-artifact@v4
315
+ with:
316
+ path: dist
317
+ merge-multiple: true
318
+
319
+ - name: Check release artifacts
320
+ run: |
321
+ python scripts/check_release_artifacts.py check --dist-dir dist --report-dir release-artifact-report --venv-dir release-artifact-venv
322
+
323
+ - name: Upload release artifact report
324
+ uses: actions/upload-artifact@v4
325
+ if: always()
326
+ with:
327
+ name: release-artifact-report
328
+ path: release-artifact-report/
329
+ if-no-files-found: ignore
330
+
331
+ github-release:
332
+ name: GitHub Release assets
333
+ if: startsWith(github.ref, 'refs/tags/')
334
+ needs:
335
+ - release-artifact-check
336
+ runs-on: ubuntu-latest
337
+ permissions:
338
+ contents: write
339
+ steps:
340
+ - name: Download wheel distributions
341
+ uses: actions/download-artifact@v4
342
+ with:
343
+ path: dist
344
+ pattern: wheels-*
345
+ merge-multiple: true
346
+
347
+ - name: Download source distribution
348
+ uses: actions/download-artifact@v4
349
+ with:
350
+ name: sdist
351
+ path: dist
352
+
353
+ - name: Create or update GitHub Release
354
+ env:
355
+ GH_TOKEN: ${{ github.token }}
356
+ TAG_NAME: ${{ github.ref_name }}
357
+ run: |
358
+ if gh release view "$TAG_NAME" >/dev/null 2>&1; then
359
+ gh release upload "$TAG_NAME" dist/* --clobber
360
+ else
361
+ gh release create "$TAG_NAME" dist/* --verify-tag --generate-notes --title "$TAG_NAME"
362
+ fi
363
+
364
+ publish-pypi:
365
+ name: Publish to PyPI
366
+ if: startsWith(github.ref, 'refs/tags/')
367
+ needs:
368
+ - release-artifact-check
369
+ runs-on: ubuntu-latest
370
+ environment: pypi
371
+ permissions:
372
+ id-token: write
373
+ steps:
374
+ - name: Download wheel distributions
375
+ uses: actions/download-artifact@v4
376
+ with:
377
+ path: dist
378
+ pattern: wheels-*
379
+ merge-multiple: true
380
+
381
+ - name: Download source distribution
382
+ uses: actions/download-artifact@v4
383
+ with:
384
+ name: sdist
385
+ path: dist
386
+
387
+ - name: Publish distributions to PyPI
388
+ uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b
@@ -0,0 +1,13 @@
1
+ /target/
2
+ /.venv/
3
+ /dist/
4
+ /build/
5
+ /*.egg-info/
6
+ /python/*.egg-info/
7
+ __pycache__/
8
+ *.py[cod]
9
+ *.so
10
+ .pytest_cache/
11
+ .mypy_cache/
12
+ .ruff_cache/
13
+