Skip to main content

A CLI for processing composite Wavefront OBJ files for use in MuJoCo

Project description

obj2mjcf

PyPI Python Version PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

obj2mjcf-0.0.24.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

obj2mjcf-0.0.24-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file obj2mjcf-0.0.24.tar.gz.

File metadata

  • Download URL: obj2mjcf-0.0.24.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for obj2mjcf-0.0.24.tar.gz
Algorithm Hash digest
SHA256 3a8cec908278f33edbb80c8a17ec4885d758bc3038e30792d99de53f3056a379
MD5 dac999680f7bad72246ccae781b8fa3d
BLAKE2b-256 07f25bbc4f483ba856bfca0d07ef29116bcc97c493404ba67ff01233c75ac9d0

See more details on using hashes here.

File details

Details for the file obj2mjcf-0.0.24-py3-none-any.whl.

File metadata

  • Download URL: obj2mjcf-0.0.24-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for obj2mjcf-0.0.24-py3-none-any.whl
Algorithm Hash digest
SHA256 187ca4b17a18ade16617c41787c76c950635cf2414d1095e169c78dde7a2b683
MD5 82f0bce6ab8b5809d9d3a4ec139f3359
BLAKE2b-256 42ca32bb9a36cb9c8b1cd2031cb8ff464a3c6a947184a29ee97662f0eb219dec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page