A CLI for processing composite Wavefront OBJ files for use in MuJoCo
Project description
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:
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.
The recommended way to install this package is via PyPI:
pip install --upgrade obj2mjcf
Usage
Type the following at the command line for a detailed description of available options:
obj2mjcf --help
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file obj2mjcf-0.0.25.tar.gz
.
File metadata
- Download URL: obj2mjcf-0.0.25.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c01806d8f81d1314e7f5acb56bfad8816b34fed1ebcd69625586407a241b9a9 |
|
MD5 | b614d2570d1a124bc9bd31dadb0d5591 |
|
BLAKE2b-256 | 3b00127af3219bbfd2951d774aa16a8c60fc39a7199d7f1c3255f0e1d6c6404e |
File details
Details for the file obj2mjcf-0.0.25-py3-none-any.whl
.
File metadata
- Download URL: obj2mjcf-0.0.25-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25376e061f3818370b2b806218e29d7648589dfdf64b57e96f55a3a1dd642409 |
|
MD5 | a7420d61911b0bcd273cbc1c2f534cee |
|
BLAKE2b-256 | 4cad2a7c1ab8eb30387b9b14728ffa1d221c9c3d3979d2da96dcf96c87004fe1 |