yubi-mujoco 0.1.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.
- yubi_mujoco-0.1.0/.python-version +1 -0
- yubi_mujoco-0.1.0/CHANGELOG.md +54 -0
- yubi_mujoco-0.1.0/CONTRIBUTING.md +133 -0
- yubi_mujoco-0.1.0/LICENSE +26 -0
- yubi_mujoco-0.1.0/MANIFEST.in +15 -0
- yubi_mujoco-0.1.0/PKG-INFO +169 -0
- yubi_mujoco-0.1.0/README.md +135 -0
- yubi_mujoco-0.1.0/cad/export.py +337 -0
- yubi_mujoco-0.1.0/cad/fetch_source.py +36 -0
- yubi_mujoco-0.1.0/cad/mass_properties.py +232 -0
- yubi_mujoco-0.1.0/cad/source/COMMERCIAL.md +211 -0
- yubi_mujoco-0.1.0/cad/source/LICENSE +289 -0
- yubi_mujoco-0.1.0/cad/source/YUBI Gripper Assy_Dynamixel_ver2.STEP +107556 -0
- yubi_mujoco-0.1.0/docs/CAD_PROVENANCE.md +223 -0
- yubi_mujoco-0.1.0/docs/model.md +209 -0
- yubi_mujoco-0.1.0/docs/usage.md +295 -0
- yubi_mujoco-0.1.0/docs/validation.md +166 -0
- yubi_mujoco-0.1.0/examples/nominal.json +11 -0
- yubi_mujoco-0.1.0/examples/policy.py +22 -0
- yubi_mujoco-0.1.0/pyproject.toml +66 -0
- yubi_mujoco-0.1.0/scripts/check_dist.py +263 -0
- yubi_mujoco-0.1.0/setup.cfg +4 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/__init__.py +13 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/__main__.py +3 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/_images.py +31 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/adapter.py +107 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/NOTICE.md +34 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/SOURCE.md +42 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/cad_assembly.json +167 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/cad_manifest.json +801 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/colors.json +14 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/licenses/Apache-2.0.txt +202 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/licenses/CERN-OHL-W-2.0.txt +289 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/licenses/MIT.txt +26 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/mass_properties.json +108 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_left_jaw_attachment.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_left_jaw_flap.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_left_jaw_hardware.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_left_jaw_pad.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_left_jaw_rubber.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_palm_camera.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_palm_servo.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_palm_structure.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_right_jaw_attachment.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_right_jaw_flap.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_right_jaw_hardware.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_right_jaw_pad.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/assets/meshes/cad_right_jaw_rubber.stl +0 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/cli.py +268 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/env.py +360 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/geometry.py +57 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/model.py +310 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco/scripted.py +77 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco.egg-info/PKG-INFO +169 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco.egg-info/SOURCES.txt +63 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco.egg-info/dependency_links.txt +1 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco.egg-info/entry_points.txt +2 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco.egg-info/requires.txt +7 -0
- yubi_mujoco-0.1.0/src/yubi_mujoco.egg-info/top_level.txt +1 -0
- yubi_mujoco-0.1.0/tests/conftest.py +7 -0
- yubi_mujoco-0.1.0/tests/test_contract.py +539 -0
- yubi_mujoco-0.1.0/tests/test_geometry.py +148 -0
- yubi_mujoco-0.1.0/tests/test_package.py +188 -0
- yubi_mujoco-0.1.0/tests/test_tasks.py +41 -0
- yubi_mujoco-0.1.0/uv.lock +1786 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- Jaw angle zero is now the closed pose of yubi-sw's `yubi_hand.urdf.xacro`
|
|
8
|
+
(7.5° closed from the CAD parallel jaws), so recorded glove `joint_states`
|
|
9
|
+
map 1:1 onto jaw angles; the default open command is 0.68 rad
|
|
10
|
+
- Jaw hinges stop at 0.03 rad (pads touch) and 0.80 rad (CAD opening
|
|
11
|
+
interference); commands up to the 0.94 rad glove range are still accepted
|
|
12
|
+
- Body masses and full inertias come from the pinned STEP via the new
|
|
13
|
+
`cad/mass_properties.py` and `mass_properties.json` asset
|
|
14
|
+
- Gripper defaults follow the DYNAMIXEL XM430-W350: 4.1 N m stall torque and a
|
|
15
|
+
4.8 rad/s no-load torque-speed line (`gripper_speed`); gain raised to 20
|
|
16
|
+
- Wrist camera moved to the CAD lens center with its 10° downward pitch
|
|
17
|
+
- Palm collision box extended to the servo bracket's underside
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- Keyboard `teleop` command; teleoperation belongs in a separate repository
|
|
22
|
+
|
|
23
|
+
## 0.1.0 — initial release candidate
|
|
24
|
+
|
|
25
|
+
This version is prepared for an initial release. Availability on PyPI depends
|
|
26
|
+
on a successful publication; this entry alone does not indicate it is published.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- Installable `yubi_mujoco` package with `yubi-mujoco` and
|
|
31
|
+
`python -m yubi_mujoco` entry points
|
|
32
|
+
- Arm-free, finite-stiffness mocap-driven YUBI hands with contact-based object
|
|
33
|
+
manipulation and one coupled-jaw actuator per hand
|
|
34
|
+
- Toyota CAD-derived black/red grippers from 97 source solids, distributed as
|
|
35
|
+
13 active material meshes with provenance, hashes, and hardware-license notices
|
|
36
|
+
- Seeded pick/place, dual pick/place, lift, and push scripted regressions
|
|
37
|
+
- Absolute hand-root pose/motor API and delta-pose policy adapter
|
|
38
|
+
- Local `Policy(checkpoint_dir).infer(obs)` evaluation with wrist images,
|
|
39
|
+
configurable chunk adoption, explicit timing, and JSON diagnostics
|
|
40
|
+
- PNG scene rendering, optional MP4 recording, portable MJCF export
|
|
41
|
+
- Real-time MuJoCo viewer for `demo` and `evaluate` (`--viewer`), with automatic
|
|
42
|
+
`mjpython` relaunch on macOS for the viewer
|
|
43
|
+
- Minimal base dependencies: MuJoCo, NumPy, and SciPy; video dependencies in
|
|
44
|
+
the optional `video` extra
|
|
45
|
+
- English usage, model-limit, validation, contributor, and release documentation
|
|
46
|
+
- Source-only CAD regeneration inputs/tools, separate from the runtime wheel
|
|
47
|
+
- uv project workflow with a cross-platform lockfile, a local development
|
|
48
|
+
dependency group, pinned build tools, and locked CI installs
|
|
49
|
+
|
|
50
|
+
### Scope
|
|
51
|
+
|
|
52
|
+
The included demos use privileged simulator state. Motor mapping, dynamics,
|
|
53
|
+
contact, and camera models remain uncalibrated. This is an independent simulation,
|
|
54
|
+
not an official UMI Arena benchmark or evidence of real-robot policy performance.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Keep installation small, behavior reproducible, and physical assumptions
|
|
4
|
+
explicit. Useful contributions include regression tests, clearer API boundaries,
|
|
5
|
+
measured calibration data with provenance, and improved collision models.
|
|
6
|
+
|
|
7
|
+
## Development setup
|
|
8
|
+
|
|
9
|
+
Install [uv](https://docs.astral.sh/uv/getting-started/installation/) and use the
|
|
10
|
+
committed lockfile. The checkout defaults to Python 3.12; Python 3.10+ remains
|
|
11
|
+
supported. uv creates `.venv` automatically, without shell activation:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
uv sync --locked --extra video
|
|
15
|
+
uv lock --check
|
|
16
|
+
uv run --locked --extra video ruff check .
|
|
17
|
+
uv run --locked --extra video ruff format --check .
|
|
18
|
+
uv run --locked --extra video pytest -q
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Development tools live in `[dependency-groups].dev` and are included by default;
|
|
22
|
+
`video` remains a published optional extra. Use `uv add` for runtime dependencies,
|
|
23
|
+
`uv add --dev` for development tools, and `uv add --optional video` for video
|
|
24
|
+
requirements. Commit `pyproject.toml` and the generated `uv.lock` together. To
|
|
25
|
+
refresh a specific dependency intentionally, use `uv lock --upgrade-package NAME`,
|
|
26
|
+
then run the checks. Do not hand-edit the lockfile. CI rejects a stale lockfile.
|
|
27
|
+
|
|
28
|
+
Rendering tests need system OpenGL support. On headless Linux with EGL configured,
|
|
29
|
+
use `MUJOCO_GL=egl uv run --locked --extra video pytest -q`. See [usage](docs/usage.md) for backend and
|
|
30
|
+
viewer notes. Keep generated rollouts, build products, virtual environments,
|
|
31
|
+
checkpoints, credentials, and local caches out of commits.
|
|
32
|
+
|
|
33
|
+
## Changes and tests
|
|
34
|
+
|
|
35
|
+
Keep a change focused and explain the behavior it changes. Include a regression
|
|
36
|
+
test for bug fixes. Before opening a pull request:
|
|
37
|
+
|
|
38
|
+
1. Run lint and the relevant tests, then the complete test suite.
|
|
39
|
+
2. Run a base-install demo and reload a portable MJCF export if model/assets changed.
|
|
40
|
+
3. Check rendered overview and wrist images for visual changes.
|
|
41
|
+
4. Update the API/model documentation and changelog when behavior changes.
|
|
42
|
+
5. Report exact commands, platform, Python/MuJoCo versions, and anything untested.
|
|
43
|
+
|
|
44
|
+
For policy changes, preserve left/right ordering, hand-root frames, xyzw
|
|
45
|
+
quaternions, absolute motor radians, and the distinction between observations
|
|
46
|
+
and privileged `info`. Never make the scripted baseline appear to be a learned
|
|
47
|
+
policy. Preserve the 10 Hz versus 30 Hz distinction when changing timing.
|
|
48
|
+
|
|
49
|
+
For physics changes, do not directly move object free-joint state during actions
|
|
50
|
+
or introduce hidden grasp attachments. Maintain the open-hand negative control.
|
|
51
|
+
If a deliberate alternative model needs different behavior, expose and document
|
|
52
|
+
it rather than silently changing the meaning of existing results.
|
|
53
|
+
|
|
54
|
+
## CAD and third-party assets
|
|
55
|
+
|
|
56
|
+
Read [CAD provenance](docs/CAD_PROVENANCE.md) before regenerating geometry.
|
|
57
|
+
Runtime users should not need FreeCAD. Keep source STEP inputs and regeneration
|
|
58
|
+
tools in `cad/`, and keep only the 13 active material meshes in the installed
|
|
59
|
+
package. If topology changes intentionally, update the count, manifests, tests,
|
|
60
|
+
and documentation together.
|
|
61
|
+
|
|
62
|
+
Verify source hashes, unique solid membership, units, pivots, and local frames.
|
|
63
|
+
Do not replace geometry from memory or infer physical calibration from appearance.
|
|
64
|
+
Record exporter/tool versions and inspect articulation after regeneration.
|
|
65
|
+
|
|
66
|
+
Original simulation software is MIT; hardware-derived geometry and transform
|
|
67
|
+
data remain CERN-OHL-W-2.0. Preserve Toyota attribution, modification notices,
|
|
68
|
+
source access, and license texts. Upstream software references use Apache-2.0.
|
|
69
|
+
Do not label the complete distribution “MIT-only” or imply Toyota/AIRoA endorsement.
|
|
70
|
+
|
|
71
|
+
## Build and inspect distributions
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
uv build
|
|
75
|
+
uv run --locked --no-sync twine check --strict dist/*
|
|
76
|
+
uv run --locked --no-sync python scripts/check_dist.py dist
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`uv build` builds the source archive first, then builds the wheel from that
|
|
80
|
+
archive. Isolated build dependencies are pinned separately in
|
|
81
|
+
`[tool.uv].build-constraint-dependencies`; `uv.lock` locks runtime and development
|
|
82
|
+
dependencies. Review and test updates to both when updating the build tools.
|
|
83
|
+
|
|
84
|
+
Check both wheel and source archive contents. The wheel must contain the active
|
|
85
|
+
meshes, JSON manifests, source/attribution notices, and relevant licenses. The
|
|
86
|
+
source archive must retain `uv.lock`, `.python-version`, and the CAD regeneration
|
|
87
|
+
inputs and tools. Neither should
|
|
88
|
+
contain local environments, credentials, experiment outputs, or caches.
|
|
89
|
+
|
|
90
|
+
Install the wheel into a clean environment outside the checkout. Test
|
|
91
|
+
`yubi-mujoco --version`, `demo`, `render`, and `export-mjcf` without the video
|
|
92
|
+
extra. Then install the video extra and test MP4 output. Follow the broader
|
|
93
|
+
[validation guide](docs/validation.md). A source-tree test pass does not prove
|
|
94
|
+
that the built wheel is complete.
|
|
95
|
+
|
|
96
|
+
## Releasing to PyPI
|
|
97
|
+
|
|
98
|
+
The release workflow is triggered by publishing a GitHub release. Preparing a
|
|
99
|
+
checkout, pushing a tag, or running a build alone does not establish that the
|
|
100
|
+
package has been published. Check the workflow result and the PyPI project
|
|
101
|
+
before announcing installation from PyPI.
|
|
102
|
+
|
|
103
|
+
Maintainer steps:
|
|
104
|
+
|
|
105
|
+
1. Choose the version and update `pyproject.toml`, the package version, and
|
|
106
|
+
`CHANGELOG.md` together. Update the same-version sdist filename and PyPI URL
|
|
107
|
+
in `src/yubi_mujoco/assets/SOURCE.md`; archive checks reject stale source links.
|
|
108
|
+
Run `uv lock` to refresh the locked project version, then run the complete
|
|
109
|
+
release checks on that exact commit.
|
|
110
|
+
2. In PyPI, create an upload token yourself. Store it in the GitHub repository's
|
|
111
|
+
Actions secret named `PYPI_API_TOKEN`; never commit it or paste it into an
|
|
112
|
+
issue, log, or chat. This workflow uses a token, not OIDC trusted publishing.
|
|
113
|
+
3. If the PyPI project does not exist yet, initial upload requires a token whose
|
|
114
|
+
scope permits creating it. After the first successful publication, replace
|
|
115
|
+
that credential with a project-scoped `yubi-mujoco` token and revoke the
|
|
116
|
+
initial broader token. Follow [PyPI's API-token guidance](https://pypi.org/help/#apitoken).
|
|
117
|
+
4. Tag the validated commit with `v` plus the exact package version, for example
|
|
118
|
+
`v0.1.0` for version `0.1.0`. Publish the corresponding GitHub release to
|
|
119
|
+
trigger the release workflow.
|
|
120
|
+
5. Inspect the workflow's test, build, distribution-check, and upload results.
|
|
121
|
+
Verify the expected version and files on PyPI, then install that version in a
|
|
122
|
+
clean environment and run the public CLI smoke checks.
|
|
123
|
+
|
|
124
|
+
The configured workflow needs the repository secret; it does not require a
|
|
125
|
+
GitHub Environment. If maintainers want an additional manual approval boundary,
|
|
126
|
+
configure a protected `pypi` Environment and have the publishing job use it.
|
|
127
|
+
That is a separate repository/workflow configuration change, not provided by the
|
|
128
|
+
secret alone. Package publication and those settings remain maintainer actions.
|
|
129
|
+
|
|
130
|
+
PyPI normalizes underscores and hyphens in project names: `yubi_mujoco` is the
|
|
131
|
+
installation/import spelling used here, `yubi-mujoco` is the normalized project
|
|
132
|
+
name and console command. Do not upload a different artifact under an already
|
|
133
|
+
published version. Fix an error with a new version and document the change.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 YUBI simulation contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
EXCEPTION: Toyota-derived CAD, STEP and STL assets and transformation metadata
|
|
24
|
+
retain their original CERN-OHL-W-2.0 license, Copyright 2026 Toyota Motor
|
|
25
|
+
Corporation. See src/yubi_mujoco/assets/licenses/CERN-OHL-W-2.0.txt and docs/CAD_PROVENANCE.md. This MIT
|
|
26
|
+
license does not relicense those assets.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
include LICENSE README.md CHANGELOG.md CONTRIBUTING.md pyproject.toml uv.lock .python-version
|
|
2
|
+
recursive-include src/yubi_mujoco *.py *.json *.md *.stl *.txt py.typed
|
|
3
|
+
recursive-include tests *.py
|
|
4
|
+
recursive-include examples *.py *.json
|
|
5
|
+
recursive-include docs *.md
|
|
6
|
+
recursive-include cad *.py *.md *.STEP LICENSE
|
|
7
|
+
recursive-include scripts *.py
|
|
8
|
+
prune .github
|
|
9
|
+
prune build
|
|
10
|
+
prune dist
|
|
11
|
+
prune yubi-output
|
|
12
|
+
prune .venv
|
|
13
|
+
prune .pytest_cache
|
|
14
|
+
prune .ruff_cache
|
|
15
|
+
global-exclude __pycache__ *.py[cod] .DS_Store
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: yubi_mujoco
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: CAD-based, arm-free YUBI gripper simulation for MuJoCo
|
|
5
|
+
Author: YUBI MuJoCo contributors
|
|
6
|
+
License-Expression: MIT AND CERN-OHL-W-2.0 AND Apache-2.0
|
|
7
|
+
Project-URL: Repository, https://github.com/k1000dai/yubi_mujoco
|
|
8
|
+
Project-URL: Issues, https://github.com/k1000dai/yubi_mujoco/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/k1000dai/yubi_mujoco/blob/main/CHANGELOG.md
|
|
10
|
+
Keywords: mujoco,robotics,gripper,yubi,simulation,mjcf
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
License-File: src/yubi_mujoco/assets/licenses/Apache-2.0.txt
|
|
24
|
+
License-File: src/yubi_mujoco/assets/licenses/CERN-OHL-W-2.0.txt
|
|
25
|
+
License-File: src/yubi_mujoco/assets/licenses/MIT.txt
|
|
26
|
+
License-File: src/yubi_mujoco/assets/NOTICE.md
|
|
27
|
+
Requires-Dist: mujoco<4,>=3.2
|
|
28
|
+
Requires-Dist: numpy>=1.26
|
|
29
|
+
Requires-Dist: scipy>=1.12
|
|
30
|
+
Provides-Extra: video
|
|
31
|
+
Requires-Dist: imageio>=2.34; extra == "video"
|
|
32
|
+
Requires-Dist: imageio-ffmpeg>=0.5; extra == "video"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# yubi_mujoco
|
|
36
|
+
|
|
37
|
+
Arm-free YUBI gripper simulation in MuJoCo. Command two end-effector poses and
|
|
38
|
+
absolute gripper angles, test contact-based manipulation, and connect a local
|
|
39
|
+
`Policy.infer(obs)` implementation.
|
|
40
|
+
|
|
41
|
+
<p align="center">
|
|
42
|
+
<img src="https://raw.githubusercontent.com/k1000dai/yubi_mujoco/main/docs/images/scene.png" alt="Two YUBI grippers above a table with a red cube and a goal marker" width="49%">
|
|
43
|
+
<img src="https://raw.githubusercontent.com/k1000dai/yubi_mujoco/main/docs/images/dual_pick_place.png" alt="Both YUBI grippers carrying cubes toward their goals in the dual pick-and-place task" width="49%">
|
|
44
|
+
</p>
|
|
45
|
+
|
|
46
|
+
The black/red grippers use Toyota's actual robot-gripper CAD: 97 source solids,
|
|
47
|
+
partitioned into 13 material meshes. Dynamic hands follow finite-stiffness mocap
|
|
48
|
+
targets; objects are moved by contact, without grasp attachments or teleporting.
|
|
49
|
+
|
|
50
|
+
**Independent, unofficial simulation.** This is for interface checks, synthetic
|
|
51
|
+
experiments, and regression tests. It is not a calibrated robot model or an
|
|
52
|
+
UMI Arena benchmark. The bundled scripted demos use privileged object positions;
|
|
53
|
+
their success is not a learned-policy result.
|
|
54
|
+
|
|
55
|
+
## Install
|
|
56
|
+
|
|
57
|
+
With [uv](https://docs.astral.sh/uv/getting-started/installation/):
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
git clone https://github.com/k1000dai/yubi_mujoco.git
|
|
61
|
+
cd yubi_mujoco
|
|
62
|
+
uv sync
|
|
63
|
+
uv run yubi-mujoco --version
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or with pip, from the checkout: `python -m pip install .`
|
|
67
|
+
|
|
68
|
+
Python 3.10+ is supported. The only runtime dependencies are MuJoCo, NumPy, and
|
|
69
|
+
SciPy; no GPU, ROS, FreeCAD, or robot is needed for physics. Images and the
|
|
70
|
+
viewer need a working OpenGL backend; see
|
|
71
|
+
[rendering setup](docs/usage.md#rendering-and-platform-notes).
|
|
72
|
+
|
|
73
|
+
## Quick start
|
|
74
|
+
|
|
75
|
+
### Watch it in the MuJoCo viewer
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
uv run yubi-mujoco demo --viewer
|
|
79
|
+
uv run yubi-mujoco demo --viewer --task dual_pick_place --episodes 3
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`--viewer` opens the interactive MuJoCo window and plays the rollout in real
|
|
83
|
+
time. It works for `demo` and `evaluate`; closing the window stops the run.
|
|
84
|
+
On macOS the CLI relaunches itself under `mjpython` automatically.
|
|
85
|
+
|
|
86
|
+
### Run headless
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# A contact-based pick-and-place demo; writes JSON results to yubi-output/demo
|
|
90
|
+
uv run yubi-mujoco demo
|
|
91
|
+
|
|
92
|
+
# Other tasks and repeatable seed batches
|
|
93
|
+
uv run yubi-mujoco demo --task dual_pick_place --episodes 5 --seed 0
|
|
94
|
+
uv run yubi-mujoco demo --task lift --hz 10 --output yubi-output/lift
|
|
95
|
+
uv run yubi-mujoco demo --task push --output yubi-output/push
|
|
96
|
+
|
|
97
|
+
# A scene image, and a portable MJCF bundle
|
|
98
|
+
uv run yubi-mujoco render --output scene.png --camera overview
|
|
99
|
+
uv run yubi-mujoco export-mjcf --output yubi-output/mjcf
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Tasks are `pick_place` (default), `dual_pick_place`, `lift`, and `push`. See
|
|
103
|
+
`uv run yubi-mujoco <command> --help` for all options. After a pip install, call
|
|
104
|
+
`yubi-mujoco` directly.
|
|
105
|
+
|
|
106
|
+
For MP4 video, add the optional `video` extra:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
uv run --extra video yubi-mujoco demo --task dual_pick_place --video --output yubi-output/video
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Python API
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
from yubi_mujoco import SimConfig, YubiEnv
|
|
116
|
+
|
|
117
|
+
with YubiEnv(SimConfig(task="pick_place", control_hz=30)) as env:
|
|
118
|
+
obs, info = env.reset(seed=42)
|
|
119
|
+
target = env.eef_poses.copy() # (2, 7), left then right
|
|
120
|
+
target[0, 0] += 0.03 # world +X, in metres
|
|
121
|
+
motor = env.motor_for_jaw([0.4, 0.55])
|
|
122
|
+
obs, reward, terminated, truncated, info = env.step_absolute(target, motor)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Poses are hand-root `[x, y, z, qx, qy, qz, qw]`, in metres and world coordinates.
|
|
126
|
+
Gripper commands are two **absolute motor positions in radians**, not normalized
|
|
127
|
+
openness, finger width, or deltas. Motor-to-jaw calibration is nominal. Image
|
|
128
|
+
observations are opt-in for direct API use; `info` contains privileged state.
|
|
129
|
+
See the complete [API and policy contract](docs/usage.md).
|
|
130
|
+
|
|
131
|
+
## Evaluate a local policy
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# Interface smoke test; an idle hold policy is not expected to solve the task
|
|
135
|
+
uv run yubi-mujoco evaluate --policy hold --horizon 64 --output yubi-output/hold
|
|
136
|
+
|
|
137
|
+
uv run yubi-mujoco evaluate --policy /path/to/policy.py \
|
|
138
|
+
--checkpoint /path/to/checkpoint --hz 30 --adopt-rows 16 \
|
|
139
|
+
--output yubi-output/policy
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Add `--viewer` to watch the policy act. Evaluation renders two wrist images,
|
|
143
|
+
even without `--video`, and needs OpenGL. Only load trusted Python policy files.
|
|
144
|
+
See [examples/policy.py](examples/policy.py) and the
|
|
145
|
+
[UMI Arena submission contract](https://umi-arena.airoa.io/submission-format).
|
|
146
|
+
Dataset/replay timing is 30 Hz; the published robot execution description uses
|
|
147
|
+
10 Hz. Select the intended rate explicitly. This package does not download
|
|
148
|
+
checkpoints or gated datasets, and does not replace the official checker.
|
|
149
|
+
|
|
150
|
+
## Model, validation, and development
|
|
151
|
+
|
|
152
|
+
- [Usage, controls, rendering, and policy timing](docs/usage.md)
|
|
153
|
+
- [Model assumptions and calibration limits](docs/model.md)
|
|
154
|
+
- [Validation and reproducible checks](docs/validation.md)
|
|
155
|
+
- [CAD provenance and regeneration](docs/CAD_PROVENANCE.md)
|
|
156
|
+
- [Contributing and releases](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)
|
|
157
|
+
|
|
158
|
+
Source geometry is pinned to [Toyota/yubi-hw at dd8bd13](https://github.com/Toyota/yubi-hw/tree/dd8bd13d2fd8e5003057243576f88be333d95fc5).
|
|
159
|
+
The source STEP and regeneration tools are in `cad/`; they are not runtime
|
|
160
|
+
requirements. The installed package contains the active meshes and manifests.
|
|
161
|
+
|
|
162
|
+
## Licenses
|
|
163
|
+
|
|
164
|
+
Original simulation software: [MIT](LICENSE). Toyota-derived CAD, meshes, and
|
|
165
|
+
transformation data: [CERN-OHL-W-2.0](src/yubi_mujoco/assets/licenses/CERN-OHL-W-2.0.txt),
|
|
166
|
+
Copyright 2026 Toyota Motor Corporation. Upstream software references use
|
|
167
|
+
Apache-2.0; see the [attribution notice](src/yubi_mujoco/assets/NOTICE.md).
|
|
168
|
+
Hardware-derived assets are not relicensed under MIT. Toyota and AIRoA do not
|
|
169
|
+
endorse or certify this project.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# yubi_mujoco
|
|
2
|
+
|
|
3
|
+
Arm-free YUBI gripper simulation in MuJoCo. Command two end-effector poses and
|
|
4
|
+
absolute gripper angles, test contact-based manipulation, and connect a local
|
|
5
|
+
`Policy.infer(obs)` implementation.
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<img src="https://raw.githubusercontent.com/k1000dai/yubi_mujoco/main/docs/images/scene.png" alt="Two YUBI grippers above a table with a red cube and a goal marker" width="49%">
|
|
9
|
+
<img src="https://raw.githubusercontent.com/k1000dai/yubi_mujoco/main/docs/images/dual_pick_place.png" alt="Both YUBI grippers carrying cubes toward their goals in the dual pick-and-place task" width="49%">
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
The black/red grippers use Toyota's actual robot-gripper CAD: 97 source solids,
|
|
13
|
+
partitioned into 13 material meshes. Dynamic hands follow finite-stiffness mocap
|
|
14
|
+
targets; objects are moved by contact, without grasp attachments or teleporting.
|
|
15
|
+
|
|
16
|
+
**Independent, unofficial simulation.** This is for interface checks, synthetic
|
|
17
|
+
experiments, and regression tests. It is not a calibrated robot model or an
|
|
18
|
+
UMI Arena benchmark. The bundled scripted demos use privileged object positions;
|
|
19
|
+
their success is not a learned-policy result.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
With [uv](https://docs.astral.sh/uv/getting-started/installation/):
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
git clone https://github.com/k1000dai/yubi_mujoco.git
|
|
27
|
+
cd yubi_mujoco
|
|
28
|
+
uv sync
|
|
29
|
+
uv run yubi-mujoco --version
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or with pip, from the checkout: `python -m pip install .`
|
|
33
|
+
|
|
34
|
+
Python 3.10+ is supported. The only runtime dependencies are MuJoCo, NumPy, and
|
|
35
|
+
SciPy; no GPU, ROS, FreeCAD, or robot is needed for physics. Images and the
|
|
36
|
+
viewer need a working OpenGL backend; see
|
|
37
|
+
[rendering setup](docs/usage.md#rendering-and-platform-notes).
|
|
38
|
+
|
|
39
|
+
## Quick start
|
|
40
|
+
|
|
41
|
+
### Watch it in the MuJoCo viewer
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
uv run yubi-mujoco demo --viewer
|
|
45
|
+
uv run yubi-mujoco demo --viewer --task dual_pick_place --episodes 3
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`--viewer` opens the interactive MuJoCo window and plays the rollout in real
|
|
49
|
+
time. It works for `demo` and `evaluate`; closing the window stops the run.
|
|
50
|
+
On macOS the CLI relaunches itself under `mjpython` automatically.
|
|
51
|
+
|
|
52
|
+
### Run headless
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
# A contact-based pick-and-place demo; writes JSON results to yubi-output/demo
|
|
56
|
+
uv run yubi-mujoco demo
|
|
57
|
+
|
|
58
|
+
# Other tasks and repeatable seed batches
|
|
59
|
+
uv run yubi-mujoco demo --task dual_pick_place --episodes 5 --seed 0
|
|
60
|
+
uv run yubi-mujoco demo --task lift --hz 10 --output yubi-output/lift
|
|
61
|
+
uv run yubi-mujoco demo --task push --output yubi-output/push
|
|
62
|
+
|
|
63
|
+
# A scene image, and a portable MJCF bundle
|
|
64
|
+
uv run yubi-mujoco render --output scene.png --camera overview
|
|
65
|
+
uv run yubi-mujoco export-mjcf --output yubi-output/mjcf
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Tasks are `pick_place` (default), `dual_pick_place`, `lift`, and `push`. See
|
|
69
|
+
`uv run yubi-mujoco <command> --help` for all options. After a pip install, call
|
|
70
|
+
`yubi-mujoco` directly.
|
|
71
|
+
|
|
72
|
+
For MP4 video, add the optional `video` extra:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
uv run --extra video yubi-mujoco demo --task dual_pick_place --video --output yubi-output/video
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Python API
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from yubi_mujoco import SimConfig, YubiEnv
|
|
82
|
+
|
|
83
|
+
with YubiEnv(SimConfig(task="pick_place", control_hz=30)) as env:
|
|
84
|
+
obs, info = env.reset(seed=42)
|
|
85
|
+
target = env.eef_poses.copy() # (2, 7), left then right
|
|
86
|
+
target[0, 0] += 0.03 # world +X, in metres
|
|
87
|
+
motor = env.motor_for_jaw([0.4, 0.55])
|
|
88
|
+
obs, reward, terminated, truncated, info = env.step_absolute(target, motor)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Poses are hand-root `[x, y, z, qx, qy, qz, qw]`, in metres and world coordinates.
|
|
92
|
+
Gripper commands are two **absolute motor positions in radians**, not normalized
|
|
93
|
+
openness, finger width, or deltas. Motor-to-jaw calibration is nominal. Image
|
|
94
|
+
observations are opt-in for direct API use; `info` contains privileged state.
|
|
95
|
+
See the complete [API and policy contract](docs/usage.md).
|
|
96
|
+
|
|
97
|
+
## Evaluate a local policy
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Interface smoke test; an idle hold policy is not expected to solve the task
|
|
101
|
+
uv run yubi-mujoco evaluate --policy hold --horizon 64 --output yubi-output/hold
|
|
102
|
+
|
|
103
|
+
uv run yubi-mujoco evaluate --policy /path/to/policy.py \
|
|
104
|
+
--checkpoint /path/to/checkpoint --hz 30 --adopt-rows 16 \
|
|
105
|
+
--output yubi-output/policy
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Add `--viewer` to watch the policy act. Evaluation renders two wrist images,
|
|
109
|
+
even without `--video`, and needs OpenGL. Only load trusted Python policy files.
|
|
110
|
+
See [examples/policy.py](examples/policy.py) and the
|
|
111
|
+
[UMI Arena submission contract](https://umi-arena.airoa.io/submission-format).
|
|
112
|
+
Dataset/replay timing is 30 Hz; the published robot execution description uses
|
|
113
|
+
10 Hz. Select the intended rate explicitly. This package does not download
|
|
114
|
+
checkpoints or gated datasets, and does not replace the official checker.
|
|
115
|
+
|
|
116
|
+
## Model, validation, and development
|
|
117
|
+
|
|
118
|
+
- [Usage, controls, rendering, and policy timing](docs/usage.md)
|
|
119
|
+
- [Model assumptions and calibration limits](docs/model.md)
|
|
120
|
+
- [Validation and reproducible checks](docs/validation.md)
|
|
121
|
+
- [CAD provenance and regeneration](docs/CAD_PROVENANCE.md)
|
|
122
|
+
- [Contributing and releases](CONTRIBUTING.md) · [Changelog](CHANGELOG.md)
|
|
123
|
+
|
|
124
|
+
Source geometry is pinned to [Toyota/yubi-hw at dd8bd13](https://github.com/Toyota/yubi-hw/tree/dd8bd13d2fd8e5003057243576f88be333d95fc5).
|
|
125
|
+
The source STEP and regeneration tools are in `cad/`; they are not runtime
|
|
126
|
+
requirements. The installed package contains the active meshes and manifests.
|
|
127
|
+
|
|
128
|
+
## Licenses
|
|
129
|
+
|
|
130
|
+
Original simulation software: [MIT](LICENSE). Toyota-derived CAD, meshes, and
|
|
131
|
+
transformation data: [CERN-OHL-W-2.0](src/yubi_mujoco/assets/licenses/CERN-OHL-W-2.0.txt),
|
|
132
|
+
Copyright 2026 Toyota Motor Corporation. Upstream software references use
|
|
133
|
+
Apache-2.0; see the [attribution notice](src/yubi_mujoco/assets/NOTICE.md).
|
|
134
|
+
Hardware-derived assets are not relicensed under MIT. Toyota and AIRoA do not
|
|
135
|
+
endorse or certify this project.
|