openphysgraspgen 1.0.0__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 (49) hide show
  1. openphysgraspgen-1.0.0/LICENSE +201 -0
  2. openphysgraspgen-1.0.0/NOTICE +9 -0
  3. openphysgraspgen-1.0.0/PKG-INFO +224 -0
  4. openphysgraspgen-1.0.0/README.md +187 -0
  5. openphysgraspgen-1.0.0/pyproject.toml +56 -0
  6. openphysgraspgen-1.0.0/setup.cfg +4 -0
  7. openphysgraspgen-1.0.0/src/openphysgraspgen/__init__.py +64 -0
  8. openphysgraspgen-1.0.0/src/openphysgraspgen/__main__.py +5 -0
  9. openphysgraspgen-1.0.0/src/openphysgraspgen/benchmark/__init__.py +25 -0
  10. openphysgraspgen-1.0.0/src/openphysgraspgen/benchmark/cli.py +85 -0
  11. openphysgraspgen-1.0.0/src/openphysgraspgen/benchmark/pg_t1.py +1448 -0
  12. openphysgraspgen-1.0.0/src/openphysgraspgen/benchmark/pg_t1_report.py +571 -0
  13. openphysgraspgen-1.0.0/src/openphysgraspgen/confidence.py +42 -0
  14. openphysgraspgen-1.0.0/src/openphysgraspgen/constitutive.py +292 -0
  15. openphysgraspgen-1.0.0/src/openphysgraspgen/dataset/__init__.py +45 -0
  16. openphysgraspgen-1.0.0/src/openphysgraspgen/dataset/check_criteria.yaml +53 -0
  17. openphysgraspgen-1.0.0/src/openphysgraspgen/dataset/check_dataset.py +4790 -0
  18. openphysgraspgen-1.0.0/src/openphysgraspgen/dataset/finalize.py +394 -0
  19. openphysgraspgen-1.0.0/src/openphysgraspgen/dataset/reader.py +118 -0
  20. openphysgraspgen-1.0.0/src/openphysgraspgen/dataset/video.py +306 -0
  21. openphysgraspgen-1.0.0/src/openphysgraspgen/dataset/writer.py +936 -0
  22. openphysgraspgen-1.0.0/src/openphysgraspgen/estimation.py +58 -0
  23. openphysgraspgen-1.0.0/src/openphysgraspgen/formulations.py +89 -0
  24. openphysgraspgen-1.0.0/src/openphysgraspgen/generation.py +115 -0
  25. openphysgraspgen-1.0.0/src/openphysgraspgen/pipeline.py +130 -0
  26. openphysgraspgen-1.0.0/src/openphysgraspgen/py.typed +0 -0
  27. openphysgraspgen-1.0.0/src/openphysgraspgen/records.py +132 -0
  28. openphysgraspgen-1.0.0/src/openphysgraspgen/sensors/__init__.py +13 -0
  29. openphysgraspgen-1.0.0/src/openphysgraspgen/sensors/deformable_contact_sensor.py +21 -0
  30. openphysgraspgen-1.0.0/src/openphysgraspgen/sensors/force_label.py +126 -0
  31. openphysgraspgen-1.0.0/src/openphysgraspgen/sensors/frame.py +21 -0
  32. openphysgraspgen-1.0.0/src/openphysgraspgen/sensors/layers/__init__.py +6 -0
  33. openphysgraspgen-1.0.0/src/openphysgraspgen/sensors/layers/base.py +14 -0
  34. openphysgraspgen-1.0.0/src/openphysgraspgen/sensors/layers/force.py +20 -0
  35. openphysgraspgen-1.0.0/src/openphysgraspgen/sensors/recorder.py +20 -0
  36. openphysgraspgen-1.0.0/src/openphysgraspgen.egg-info/PKG-INFO +224 -0
  37. openphysgraspgen-1.0.0/src/openphysgraspgen.egg-info/SOURCES.txt +47 -0
  38. openphysgraspgen-1.0.0/src/openphysgraspgen.egg-info/dependency_links.txt +1 -0
  39. openphysgraspgen-1.0.0/src/openphysgraspgen.egg-info/entry_points.txt +2 -0
  40. openphysgraspgen-1.0.0/src/openphysgraspgen.egg-info/requires.txt +11 -0
  41. openphysgraspgen-1.0.0/src/openphysgraspgen.egg-info/top_level.txt +1 -0
  42. openphysgraspgen-1.0.0/tests/test_check_dataset.py +3594 -0
  43. openphysgraspgen-1.0.0/tests/test_collect_metrics.py +306 -0
  44. openphysgraspgen-1.0.0/tests/test_constitutive.py +86 -0
  45. openphysgraspgen-1.0.0/tests/test_dataset.py +2298 -0
  46. openphysgraspgen-1.0.0/tests/test_examples.py +28 -0
  47. openphysgraspgen-1.0.0/tests/test_pg_t1.py +2436 -0
  48. openphysgraspgen-1.0.0/tests/test_pipeline.py +47 -0
  49. openphysgraspgen-1.0.0/tests/test_sensors.py +73 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,9 @@
1
+ OpenPhysGraspGen
2
+ Copyright 2026 SpaceAI (주식회사 스페이스에이아이)
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ This product does not bundle third-party source code. At install time it
7
+ depends on NumPy (https://numpy.org), distributed under BSD-3-Clause AND 0BSD
8
+ AND MIT AND Zlib AND CC0-1.0. The full list of components and licenses for each
9
+ release is published as an SPDX and CycloneDX SBOM in the release assets.
@@ -0,0 +1,224 @@
1
+ Metadata-Version: 2.4
2
+ Name: openphysgraspgen
3
+ Version: 1.0.0
4
+ Summary: Physics-labelled grasp data generation for deformable objects
5
+ Author: SpaceAI
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/Official-Space-AI/OpenPhysGraspGen
8
+ Project-URL: Documentation, https://github.com/Official-Space-AI/OpenPhysGraspGen/tree/main/docs
9
+ Project-URL: Source, https://github.com/Official-Space-AI/OpenPhysGraspGen
10
+ Project-URL: Changelog, https://github.com/Official-Space-AI/OpenPhysGraspGen/releases
11
+ Project-URL: Issues, https://github.com/Official-Space-AI/OpenPhysGraspGen/issues
12
+ Keywords: robotics,grasping,deformable,simulation,hyperelasticity,dataset
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
22
+ Classifier: Topic :: Scientific/Engineering :: Physics
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ License-File: NOTICE
27
+ Requires-Dist: numpy>=1.24
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=9.0.3; extra == "dev"
30
+ Requires-Dist: pytest-cov>=5; extra == "dev"
31
+ Requires-Dist: ruff==0.17.6; extra == "dev"
32
+ Provides-Extra: dataset
33
+ Requires-Dist: numpy>=1.26; extra == "dataset"
34
+ Requires-Dist: pyarrow>=23.0.1; extra == "dataset"
35
+ Requires-Dist: pyyaml>=6; extra == "dataset"
36
+ Dynamic: license-file
37
+
38
+ # OpenPhysGraspGen
39
+
40
+ [![CI](https://github.com/Official-Space-AI/OpenPhysGraspGen/actions/workflows/ci.yml/badge.svg)](https://github.com/Official-Space-AI/OpenPhysGraspGen/actions/workflows/ci.yml)
41
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
42
+ ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
43
+ ![Status](https://img.shields.io/badge/status-stable-brightgreen)
44
+ [![PyPI version](https://img.shields.io/pypi/v/openphysgraspgen.svg)](https://pypi.org/project/openphysgraspgen/)
45
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.23787394.svg)](https://doi.org/10.5281/zenodo.23787394)
46
+
47
+ [한국어 README](README.ko.md)
48
+
49
+ OpenPhysGraspGen generates physics-labelled grasp data for **deformable objects**.
50
+ It calibrates a material model from measurements, transfers the calibrated
51
+ parameters to the simulator you generate data with, and records contact force and
52
+ internal stress for every grasp so that a policy can learn how hard it is
53
+ squeezing, not only where it is grasping.
54
+
55
+ It is the open part of SpaceAI's PhysGraspGen project. The library is pure Python
56
+ and NumPy, with sensor layers that read contact buffers from
57
+ [NVIDIA Newton](https://github.com/newton-physics/newton) (VBD solver).
58
+
59
+ > **Status: `1.0.0`, the first stable release.** See the [roadmap](#roadmap) for what
60
+ > each release contains.
61
+
62
+ ## What is included
63
+
64
+ | Module | What it does |
65
+ |---|---|
66
+ | `constitutive` | Hyperelastic laws (Yeoh, Mooney–Rivlin, three-term Ogden): strain energy, Cauchy stress, von Mises stress |
67
+ | `formulations`, `generation` | Calibrate material parameters against measured response, transfer them from a calibration model to a production model, build training samples with fracture labels |
68
+ | `estimation`, `confidence` | Joint estimator of material and internal stress from robot observations, plus a confidence gate that limits action scale when the estimate is unreliable |
69
+ | `sensors` | `DeformableContactSensor` and `SensorRecorder`: per-contact and net gripper/ground force labels from a Newton simulation frame |
70
+ | `records` | Typed records shared by the stages above |
71
+
72
+ The high-precision solver core, customer data and internal tooling are not part of
73
+ this repository. See [Scope of the open release](#scope-of-the-open-release).
74
+
75
+ ## Install
76
+
77
+ Python 3.10 or newer. The package is `openphysgraspgen` on PyPI:
78
+
79
+ ```bash
80
+ pip install openphysgraspgen
81
+ ```
82
+
83
+ To install the latest `main` instead:
84
+
85
+ ```bash
86
+ pip install "git+https://github.com/Official-Space-AI/OpenPhysGraspGen.git"
87
+ ```
88
+
89
+ To check the installed version:
90
+
91
+ ```bash
92
+ openphysgraspgen --version
93
+ ```
94
+
95
+ The same value is exposed in Python as `openphysgraspgen.__version__`.
96
+
97
+ For development:
98
+
99
+ ```bash
100
+ git clone https://github.com/Official-Space-AI/OpenPhysGraspGen.git
101
+ cd OpenPhysGraspGen
102
+ pip install -e ".[dev]"
103
+ ruff check . && ruff format --check .
104
+ pytest
105
+ ```
106
+
107
+ The same checks run in CI on every pull request, with tests on Python 3.10 to 3.14.
108
+
109
+ ## Quick start
110
+
111
+ Run the end-to-end reference pipeline (calibration → transfer → data generation →
112
+ estimation → confidence gate) on a small synthetic problem:
113
+
114
+ ```bash
115
+ openphysgraspgen --fracture-threshold 0.25 --confidence-threshold 0.5
116
+ ```
117
+
118
+ It prints a JSON summary with the calibrated and transferred parameters, the number
119
+ of training and fracture samples, the estimate, and whether the confidence gate
120
+ allowed it.
121
+
122
+ Score the PG-T1 benchmark from a dataset in the [public format](docs/dataset/format.md),
123
+ with the `dataset` extra installed (`pip install "openphysgraspgen[dataset]"`):
124
+
125
+ ```bash
126
+ openphysgraspgen benchmark pg-t1 path/to/dataset --json pg-t1.json
127
+ ```
128
+
129
+ It prints one table per task and writes the report to `pg-t1.json`, with one record
130
+ per episode in `pg-t1.episodes.jsonl` beside it. The scoring rules are in
131
+ [docs/benchmark/pg-t1.md](docs/benchmark/pg-t1.md).
132
+
133
+ Check a dataset against the four items of the dataset test (scale, metadata,
134
+ consistency, diversity) with the script it ships, from the dataset's root, the folder
135
+ that holds `metadata.yaml`:
136
+
137
+ ```bash
138
+ python -I tools/check_dataset.py . --seed <the tester's seed>
139
+ ```
140
+
141
+ It needs only Python 3.10 or newer with NumPy, PyArrow and PyYAML, and nothing from
142
+ this package. The options, the acceptance values and the report are under
143
+ [The check](docs/dataset/format.md#the-check).
144
+
145
+ Evaluate a constitutive law directly:
146
+
147
+ ```python
148
+ import numpy as np
149
+ from openphysgraspgen import YeohParams, cauchy_stress, von_mises_stress
150
+
151
+ silicone = YeohParams(c10=0.12e6, c20=0.01e6, c30=0.0, nu=0.45)
152
+ F = np.diag([1.2, 0.92, 0.92]) # uniaxial stretch
153
+ sigma = cauchy_stress(F, silicone) # 3x3 Cauchy stress [Pa]
154
+ print(von_mises_stress(sigma)) # about 1.4e5 Pa
155
+ ```
156
+
157
+ Record contact force labels from a Newton simulation:
158
+
159
+ ```python
160
+ from openphysgraspgen import DeformableContactSensor, SensorRecorder, SimFrame
161
+
162
+ recorder = SensorRecorder([DeformableContactSensor(contact_provenance="newton-vbd")])
163
+ frame = SimFrame(
164
+ model=model,
165
+ particle_q=state.particle_q,
166
+ contacts=contacts,
167
+ body_q=state.body_q,
168
+ n_robot_shapes=n_gripper_shapes,
169
+ )
170
+ labels = recorder.record_frame(frame) # {"force": ForceLabel(...)}
171
+ ```
172
+
173
+ ## Roadmap
174
+
175
+ Releases follow the plan of the funded project.
176
+
177
+ | Release | Target | Contents |
178
+ |---|---|---|
179
+ | Beta `0.1.0b0` | Aug 2026 | Constitutive laws, contact sensor, calibration/transfer pipeline (published 2026-08-25) |
180
+ | `1.0.0rc1` | Oct 2026 | Grasp data recorder, PyPI package, public dataset on Hugging Face (1,000,000 frames) with its check script, PG-T1 benchmark reproduction from the dataset, Docker image, CI and SBOM on every release |
181
+ | `1.0.0` | Nov 2026 | Runnable examples for the three constitutive laws (Yeoh, Mooney-Rivlin, three-term Ogden), type information (`py.typed`), a citation file, license checks with REUSE and an OSS evaluation of every dependency, vulnerability scans of the image on every release |
182
+ | Later | Not scheduled | PG-T2 and PG-T3 benchmarks |
183
+
184
+ ## Scope of the open release
185
+
186
+ PhysGraspGen is developed as open core.
187
+
188
+ | Part | Where | License |
189
+ |---|---|---|
190
+ | Library (this repository) | GitHub | Apache-2.0 |
191
+ | Grasp dataset | Hugging Face Hub (with `1.0.0rc1`) | CC-BY-NC-4.0 |
192
+ | Benchmarks and reproduction scripts | This repository (PG-T1 with `1.0.0rc1`, PG-T2 and PG-T3 in a later release) | Apache-2.0 |
193
+ | High-precision solver core | Not published | Commercial |
194
+
195
+ What SpaceAI offers commercially, how a new part is assigned to one side, and what
196
+ the project commits to for the open side are in
197
+ [docs/governance/open-core.md](docs/governance/open-core.md).
198
+
199
+ ## How development works
200
+
201
+ Day-to-day development of PhysGraspGen happens in a private repository that also
202
+ holds customer-specific code. This repository receives the general-purpose parts as
203
+ reviewed pull requests and tagged releases, so its commit history is shorter than
204
+ the project's. From now on, work on the open library is planned and reviewed here
205
+ in public: every change starts as an issue and lands through a reviewed pull
206
+ request, and releases ship with release notes and an SBOM.
207
+
208
+ ## Community and support
209
+
210
+ - Questions and ideas: [GitHub Discussions](https://github.com/Official-Space-AI/OpenPhysGraspGen/discussions)
211
+ - Bugs: [GitHub Issues](https://github.com/Official-Space-AI/OpenPhysGraspGen/issues)
212
+ - Where to ask what, and response times: [COMMUNITY.md](COMMUNITY.md)
213
+ - Community and commercial support: [SUPPORT.md](SUPPORT.md)
214
+ - Security vulnerabilities: [SECURITY.md](SECURITY.md) (please do not open a public issue)
215
+
216
+ Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) and the
217
+ [`good first issue`](https://github.com/Official-Space-AI/OpenPhysGraspGen/labels/good%20first%20issue)
218
+ label. Everyone taking part follows the [Code of Conduct](CODE_OF_CONDUCT.md). Who
219
+ decides what, and how releases are approved, is in [GOVERNANCE.md](GOVERNANCE.md).
220
+
221
+ ## License
222
+
223
+ Code is released under the [Apache License 2.0](LICENSE). The dataset is released
224
+ under [CC-BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/).
@@ -0,0 +1,187 @@
1
+ # OpenPhysGraspGen
2
+
3
+ [![CI](https://github.com/Official-Space-AI/OpenPhysGraspGen/actions/workflows/ci.yml/badge.svg)](https://github.com/Official-Space-AI/OpenPhysGraspGen/actions/workflows/ci.yml)
4
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
5
+ ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
6
+ ![Status](https://img.shields.io/badge/status-stable-brightgreen)
7
+ [![PyPI version](https://img.shields.io/pypi/v/openphysgraspgen.svg)](https://pypi.org/project/openphysgraspgen/)
8
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.23787394.svg)](https://doi.org/10.5281/zenodo.23787394)
9
+
10
+ [한국어 README](README.ko.md)
11
+
12
+ OpenPhysGraspGen generates physics-labelled grasp data for **deformable objects**.
13
+ It calibrates a material model from measurements, transfers the calibrated
14
+ parameters to the simulator you generate data with, and records contact force and
15
+ internal stress for every grasp so that a policy can learn how hard it is
16
+ squeezing, not only where it is grasping.
17
+
18
+ It is the open part of SpaceAI's PhysGraspGen project. The library is pure Python
19
+ and NumPy, with sensor layers that read contact buffers from
20
+ [NVIDIA Newton](https://github.com/newton-physics/newton) (VBD solver).
21
+
22
+ > **Status: `1.0.0`, the first stable release.** See the [roadmap](#roadmap) for what
23
+ > each release contains.
24
+
25
+ ## What is included
26
+
27
+ | Module | What it does |
28
+ |---|---|
29
+ | `constitutive` | Hyperelastic laws (Yeoh, Mooney–Rivlin, three-term Ogden): strain energy, Cauchy stress, von Mises stress |
30
+ | `formulations`, `generation` | Calibrate material parameters against measured response, transfer them from a calibration model to a production model, build training samples with fracture labels |
31
+ | `estimation`, `confidence` | Joint estimator of material and internal stress from robot observations, plus a confidence gate that limits action scale when the estimate is unreliable |
32
+ | `sensors` | `DeformableContactSensor` and `SensorRecorder`: per-contact and net gripper/ground force labels from a Newton simulation frame |
33
+ | `records` | Typed records shared by the stages above |
34
+
35
+ The high-precision solver core, customer data and internal tooling are not part of
36
+ this repository. See [Scope of the open release](#scope-of-the-open-release).
37
+
38
+ ## Install
39
+
40
+ Python 3.10 or newer. The package is `openphysgraspgen` on PyPI:
41
+
42
+ ```bash
43
+ pip install openphysgraspgen
44
+ ```
45
+
46
+ To install the latest `main` instead:
47
+
48
+ ```bash
49
+ pip install "git+https://github.com/Official-Space-AI/OpenPhysGraspGen.git"
50
+ ```
51
+
52
+ To check the installed version:
53
+
54
+ ```bash
55
+ openphysgraspgen --version
56
+ ```
57
+
58
+ The same value is exposed in Python as `openphysgraspgen.__version__`.
59
+
60
+ For development:
61
+
62
+ ```bash
63
+ git clone https://github.com/Official-Space-AI/OpenPhysGraspGen.git
64
+ cd OpenPhysGraspGen
65
+ pip install -e ".[dev]"
66
+ ruff check . && ruff format --check .
67
+ pytest
68
+ ```
69
+
70
+ The same checks run in CI on every pull request, with tests on Python 3.10 to 3.14.
71
+
72
+ ## Quick start
73
+
74
+ Run the end-to-end reference pipeline (calibration → transfer → data generation →
75
+ estimation → confidence gate) on a small synthetic problem:
76
+
77
+ ```bash
78
+ openphysgraspgen --fracture-threshold 0.25 --confidence-threshold 0.5
79
+ ```
80
+
81
+ It prints a JSON summary with the calibrated and transferred parameters, the number
82
+ of training and fracture samples, the estimate, and whether the confidence gate
83
+ allowed it.
84
+
85
+ Score the PG-T1 benchmark from a dataset in the [public format](docs/dataset/format.md),
86
+ with the `dataset` extra installed (`pip install "openphysgraspgen[dataset]"`):
87
+
88
+ ```bash
89
+ openphysgraspgen benchmark pg-t1 path/to/dataset --json pg-t1.json
90
+ ```
91
+
92
+ It prints one table per task and writes the report to `pg-t1.json`, with one record
93
+ per episode in `pg-t1.episodes.jsonl` beside it. The scoring rules are in
94
+ [docs/benchmark/pg-t1.md](docs/benchmark/pg-t1.md).
95
+
96
+ Check a dataset against the four items of the dataset test (scale, metadata,
97
+ consistency, diversity) with the script it ships, from the dataset's root, the folder
98
+ that holds `metadata.yaml`:
99
+
100
+ ```bash
101
+ python -I tools/check_dataset.py . --seed <the tester's seed>
102
+ ```
103
+
104
+ It needs only Python 3.10 or newer with NumPy, PyArrow and PyYAML, and nothing from
105
+ this package. The options, the acceptance values and the report are under
106
+ [The check](docs/dataset/format.md#the-check).
107
+
108
+ Evaluate a constitutive law directly:
109
+
110
+ ```python
111
+ import numpy as np
112
+ from openphysgraspgen import YeohParams, cauchy_stress, von_mises_stress
113
+
114
+ silicone = YeohParams(c10=0.12e6, c20=0.01e6, c30=0.0, nu=0.45)
115
+ F = np.diag([1.2, 0.92, 0.92]) # uniaxial stretch
116
+ sigma = cauchy_stress(F, silicone) # 3x3 Cauchy stress [Pa]
117
+ print(von_mises_stress(sigma)) # about 1.4e5 Pa
118
+ ```
119
+
120
+ Record contact force labels from a Newton simulation:
121
+
122
+ ```python
123
+ from openphysgraspgen import DeformableContactSensor, SensorRecorder, SimFrame
124
+
125
+ recorder = SensorRecorder([DeformableContactSensor(contact_provenance="newton-vbd")])
126
+ frame = SimFrame(
127
+ model=model,
128
+ particle_q=state.particle_q,
129
+ contacts=contacts,
130
+ body_q=state.body_q,
131
+ n_robot_shapes=n_gripper_shapes,
132
+ )
133
+ labels = recorder.record_frame(frame) # {"force": ForceLabel(...)}
134
+ ```
135
+
136
+ ## Roadmap
137
+
138
+ Releases follow the plan of the funded project.
139
+
140
+ | Release | Target | Contents |
141
+ |---|---|---|
142
+ | Beta `0.1.0b0` | Aug 2026 | Constitutive laws, contact sensor, calibration/transfer pipeline (published 2026-08-25) |
143
+ | `1.0.0rc1` | Oct 2026 | Grasp data recorder, PyPI package, public dataset on Hugging Face (1,000,000 frames) with its check script, PG-T1 benchmark reproduction from the dataset, Docker image, CI and SBOM on every release |
144
+ | `1.0.0` | Nov 2026 | Runnable examples for the three constitutive laws (Yeoh, Mooney-Rivlin, three-term Ogden), type information (`py.typed`), a citation file, license checks with REUSE and an OSS evaluation of every dependency, vulnerability scans of the image on every release |
145
+ | Later | Not scheduled | PG-T2 and PG-T3 benchmarks |
146
+
147
+ ## Scope of the open release
148
+
149
+ PhysGraspGen is developed as open core.
150
+
151
+ | Part | Where | License |
152
+ |---|---|---|
153
+ | Library (this repository) | GitHub | Apache-2.0 |
154
+ | Grasp dataset | Hugging Face Hub (with `1.0.0rc1`) | CC-BY-NC-4.0 |
155
+ | Benchmarks and reproduction scripts | This repository (PG-T1 with `1.0.0rc1`, PG-T2 and PG-T3 in a later release) | Apache-2.0 |
156
+ | High-precision solver core | Not published | Commercial |
157
+
158
+ What SpaceAI offers commercially, how a new part is assigned to one side, and what
159
+ the project commits to for the open side are in
160
+ [docs/governance/open-core.md](docs/governance/open-core.md).
161
+
162
+ ## How development works
163
+
164
+ Day-to-day development of PhysGraspGen happens in a private repository that also
165
+ holds customer-specific code. This repository receives the general-purpose parts as
166
+ reviewed pull requests and tagged releases, so its commit history is shorter than
167
+ the project's. From now on, work on the open library is planned and reviewed here
168
+ in public: every change starts as an issue and lands through a reviewed pull
169
+ request, and releases ship with release notes and an SBOM.
170
+
171
+ ## Community and support
172
+
173
+ - Questions and ideas: [GitHub Discussions](https://github.com/Official-Space-AI/OpenPhysGraspGen/discussions)
174
+ - Bugs: [GitHub Issues](https://github.com/Official-Space-AI/OpenPhysGraspGen/issues)
175
+ - Where to ask what, and response times: [COMMUNITY.md](COMMUNITY.md)
176
+ - Community and commercial support: [SUPPORT.md](SUPPORT.md)
177
+ - Security vulnerabilities: [SECURITY.md](SECURITY.md) (please do not open a public issue)
178
+
179
+ Contributions are welcome. Start with [CONTRIBUTING.md](CONTRIBUTING.md) and the
180
+ [`good first issue`](https://github.com/Official-Space-AI/OpenPhysGraspGen/labels/good%20first%20issue)
181
+ label. Everyone taking part follows the [Code of Conduct](CODE_OF_CONDUCT.md). Who
182
+ decides what, and how releases are approved, is in [GOVERNANCE.md](GOVERNANCE.md).
183
+
184
+ ## License
185
+
186
+ Code is released under the [Apache License 2.0](LICENSE). The dataset is released
187
+ under [CC-BY-NC-4.0](https://creativecommons.org/licenses/by-nc/4.0/).
@@ -0,0 +1,56 @@
1
+ [build-system]
2
+ requires = ["setuptools>=84.1.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "openphysgraspgen"
7
+ version = "1.0.0"
8
+ description = "Physics-labelled grasp data generation for deformable objects"
9
+ readme = "README.md"
10
+ license = "Apache-2.0"
11
+ license-files = ["LICENSE", "NOTICE"]
12
+ authors = [{ name = "SpaceAI" }]
13
+ requires-python = ">=3.10"
14
+ dependencies = ["numpy>=1.24"]
15
+ keywords = ["robotics", "grasping", "deformable", "simulation", "hyperelasticity", "dataset"]
16
+ classifiers = [
17
+ "Development Status :: 5 - Production/Stable",
18
+ "Intended Audience :: Science/Research",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: 3.13",
25
+ "Programming Language :: Python :: 3.14",
26
+ "Topic :: Scientific/Engineering :: Physics",
27
+ ]
28
+
29
+ [project.optional-dependencies]
30
+ dev = ["pytest>=9.0.3", "pytest-cov>=5", "ruff==0.17.6"]
31
+ dataset = ["numpy>=1.26", "pyarrow>=23.0.1", "pyyaml>=6"]
32
+
33
+ [project.urls]
34
+ Homepage = "https://github.com/Official-Space-AI/OpenPhysGraspGen"
35
+ Documentation = "https://github.com/Official-Space-AI/OpenPhysGraspGen/tree/main/docs"
36
+ Source = "https://github.com/Official-Space-AI/OpenPhysGraspGen"
37
+ Changelog = "https://github.com/Official-Space-AI/OpenPhysGraspGen/releases"
38
+ Issues = "https://github.com/Official-Space-AI/OpenPhysGraspGen/issues"
39
+
40
+ [project.scripts]
41
+ openphysgraspgen = "openphysgraspgen.pipeline:main"
42
+
43
+ [tool.setuptools.packages.find]
44
+ where = ["src"]
45
+
46
+ [tool.setuptools.package-data]
47
+ # The PEP 561 marker, so that type checkers read the package's annotations.
48
+ openphysgraspgen = ["py.typed"]
49
+ # The acceptance values finalize_dataset ships in every dataset with the check.
50
+ "openphysgraspgen.dataset" = ["check_criteria.yaml"]
51
+
52
+ [tool.pytest.ini_options]
53
+ testpaths = ["tests"]
54
+
55
+ [tool.ruff]
56
+ target-version = "py310"