Name | obj2mjcf JSON |
Version |
0.0.25
JSON |
| download |
home_page | https://github.com/kevinzakka/obj2mjcf |
Summary | A CLI for processing composite Wavefront OBJ files for use in MuJoCo |
upload_time | 2024-03-17 18:55:07 |
maintainer | Kevin Zakka |
docs_url | None |
author | Kevin Zakka |
requires_python | >=3.8 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# obj2mjcf
[![PyPI Python Version][pypi-versions-badge]][pypi]
[![PyPI version][pypi-badge]][pypi]
[pypi-versions-badge]: https://img.shields.io/pypi/pyversions/obj2mjcf
[pypi-badge]: https://badge.fury.io/py/obj2mjcf.svg
[pypi]: https://pypi.org/project/obj2mjcf/
`obj2mjcf` is a CLI for proccessing composite Wavefront [OBJ] files for use in [MuJoCo]. It automatically:
* Splits an OBJ file into sub-meshes that are grouped by the materials referenced in the OBJ's MTL file
* Generates an MJCF XML file that is pre-filled with materials, meshes and geom elements referencing these OBJ files
* Optionally generates a collision mesh by performing a convex decomposition of the OBJ using [CoACD]
`obj2mjcf` was used to process model meshes for [MuJoCo Menagerie]:
<p float="left">
<img src="https://raw.githubusercontent.com/deepmind/mujoco_menagerie/main/anybotics_anymal_c/anymal_c.png" height="200">
<img src="https://raw.githubusercontent.com/deepmind/mujoco_menagerie/main/franka_emika_panda/panda.png" height="200">
</p>
## Motivation
As of June 2022, MuJoCo does not support composite OBJ files consisting of groups or objects (`o` or `g` OBJ tags) and only 1 material can be assigned per mesh. This means that you have to manually split your OBJ file into sub-meshes, a process that is tedious and error-prone. This tool is meant to automate this process.
## Installation
**Important.** MuJoCo support for OBJ files is only available in versions 2.1.2 and above. Make sure you upgrade to the latest version via the [Releases page](https://github.com/deepmind/mujoco/releases).
The recommended way to install this package is via [PyPI](https://pypi.org/project/obj2mjcf/):
```bash
pip install --upgrade obj2mjcf
```
## Usage
Type the following at the command line for a detailed description of available options:
```bash
obj2mjcf --help
```
[OBJ]: https://en.wikipedia.org/wiki/Wavefront_.obj_file
[MuJoCo]: https://github.com/deepmind/mujoco
[CoACD]: https://github.com/SarahWeiii/CoACD
[MuJoCo Menagerie]: https://github.com/deepmind/mujoco_menagerie
Raw data
{
"_id": null,
"home_page": "https://github.com/kevinzakka/obj2mjcf",
"name": "obj2mjcf",
"maintainer": "Kevin Zakka",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "kevinarmandzakka@gmail.com",
"keywords": "",
"author": "Kevin Zakka",
"author_email": "kevinarmandzakka@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/3b/00/127af3219bbfd2951d774aa16a8c60fc39a7199d7f1c3255f0e1d6c6404e/obj2mjcf-0.0.25.tar.gz",
"platform": null,
"description": "# obj2mjcf\n\n[![PyPI Python Version][pypi-versions-badge]][pypi]\n[![PyPI version][pypi-badge]][pypi]\n\n[pypi-versions-badge]: https://img.shields.io/pypi/pyversions/obj2mjcf\n[pypi-badge]: https://badge.fury.io/py/obj2mjcf.svg\n[pypi]: https://pypi.org/project/obj2mjcf/\n\n`obj2mjcf` is a CLI for proccessing composite Wavefront [OBJ] files for use in [MuJoCo]. It automatically:\n\n* Splits an OBJ file into sub-meshes that are grouped by the materials referenced in the OBJ's MTL file\n* Generates an MJCF XML file that is pre-filled with materials, meshes and geom elements referencing these OBJ files\n* Optionally generates a collision mesh by performing a convex decomposition of the OBJ using [CoACD]\n\n`obj2mjcf` was used to process model meshes for [MuJoCo Menagerie]:\n\n<p float=\"left\">\n <img src=\"https://raw.githubusercontent.com/deepmind/mujoco_menagerie/main/anybotics_anymal_c/anymal_c.png\" height=\"200\">\n <img src=\"https://raw.githubusercontent.com/deepmind/mujoco_menagerie/main/franka_emika_panda/panda.png\" height=\"200\">\n</p>\n\n## Motivation\n\nAs of June 2022, MuJoCo does not support composite OBJ files consisting of groups or objects (`o` or `g` OBJ tags) and only 1 material can be assigned per mesh. This means that you have to manually split your OBJ file into sub-meshes, a process that is tedious and error-prone. This tool is meant to automate this process.\n\n## Installation\n\n**Important.** MuJoCo support for OBJ files is only available in versions 2.1.2 and above. Make sure you upgrade to the latest version via the [Releases page](https://github.com/deepmind/mujoco/releases).\n\nThe recommended way to install this package is via [PyPI](https://pypi.org/project/obj2mjcf/):\n\n```bash\npip install --upgrade obj2mjcf\n```\n\n## Usage\n\nType the following at the command line for a detailed description of available options:\n\n```bash\nobj2mjcf --help\n```\n\n[OBJ]: https://en.wikipedia.org/wiki/Wavefront_.obj_file\n[MuJoCo]: https://github.com/deepmind/mujoco\n[CoACD]: https://github.com/SarahWeiii/CoACD\n[MuJoCo Menagerie]: https://github.com/deepmind/mujoco_menagerie\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A CLI for processing composite Wavefront OBJ files for use in MuJoCo",
"version": "0.0.25",
"project_urls": {
"Homepage": "https://github.com/kevinzakka/obj2mjcf"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4cad2a7c1ab8eb30387b9b14728ffa1d221c9c3d3979d2da96dcf96c87004fe1",
"md5": "a7420d61911b0bcd273cbc1c2f534cee",
"sha256": "25376e061f3818370b2b806218e29d7648589dfdf64b57e96f55a3a1dd642409"
},
"downloads": -1,
"filename": "obj2mjcf-0.0.25-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a7420d61911b0bcd273cbc1c2f534cee",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 11088,
"upload_time": "2024-03-17T18:55:06",
"upload_time_iso_8601": "2024-03-17T18:55:06.165351Z",
"url": "https://files.pythonhosted.org/packages/4c/ad/2a7c1ab8eb30387b9b14728ffa1d221c9c3d3979d2da96dcf96c87004fe1/obj2mjcf-0.0.25-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3b00127af3219bbfd2951d774aa16a8c60fc39a7199d7f1c3255f0e1d6c6404e",
"md5": "b614d2570d1a124bc9bd31dadb0d5591",
"sha256": "1c01806d8f81d1314e7f5acb56bfad8816b34fed1ebcd69625586407a241b9a9"
},
"downloads": -1,
"filename": "obj2mjcf-0.0.25.tar.gz",
"has_sig": false,
"md5_digest": "b614d2570d1a124bc9bd31dadb0d5591",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 11691,
"upload_time": "2024-03-17T18:55:07",
"upload_time_iso_8601": "2024-03-17T18:55:07.952628Z",
"url": "https://files.pythonhosted.org/packages/3b/00/127af3219bbfd2951d774aa16a8c60fc39a7199d7f1c3255f0e1d6c6404e/obj2mjcf-0.0.25.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-17 18:55:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kevinzakka",
"github_project": "obj2mjcf",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "obj2mjcf"
}