Skip to main content

Lightweight scene editor for mujoco

Project description

Scene Editor

Supported Python Versions PyPI version License Code style

Lightweight, interactive scene editor for MuJoCo 3.x. Create or edit scenes in your browser to place shapes, import meshes, add robots, and edit elements interactively.

Install

From a local checkout:

pip install -e .
# or with dev tools
pip install -e '.[dev]'

Without installing, you can also run with uv:

# Run the installed console script via uv
uv run scene_editor --help
uv run scene_editor new

The following entry points do a exit, which are part of the scene_editor sub commands:

  • mjcreate
  • mjedit
  • mjprompt

Quickstart

# Start a fresh, empty scene
mjcreate

# Load from MJCF XML or a blueprint JSON
mjedit path/to/scene.xml

# Scan a directory for supported assets (obj, stl, ply, glb, gltf, usd)
scene_editor list-assets --root ~/path/to/assets

When the server starts, it prints a local URL and opens your browser. Quit with Ctrl+C or the "Quit server" button.

Example

Use the provided chemistry lab MJCF as a starting point:

# With pip-installed package
mjedit examples/prompt/scene_chemistry_lab.xml

# With uv (no install)
uv run mjedit examples/prompt/scene_chemistry_lab.xml

Then:

  • Use "Add Box/Sphere/Cylinder" to place primitive geoms.
  • Use "Add Asset" to insert a local mesh from your file system.
  • Drag the gizmo to change pose; use “Export” to write MJCF/JSON.

Prompting / Scene Generation Examples

You can conveniently generate a MuJoCo scene from a natural-language prompt (requires an OpenAI API key):

# Set this to your API key
export OPENAI_API_KEY=...
# Generate a scene from a prompt string
mjprompt

# Edit the generated scene. 
mjedit examples/prompt/scene_coffee_shop.xml

Loading a generated scene might not work out of the box in all cases. Generated scenes can have inconsistencies in geometry but can be easily edited.

Examples

Below are some generated example scenes. More examples are available in the examples/prompt folder.

Living Room
Living Room
Chess Table
Chess Table
Playground
Playground
Chemistry Lab
Chemistry Lab

Limitations

  • Importing MuJoCo XML files may alter the internal structure, and some tags are discarded.
  • Not all MuJoCo robot descriptions have an equivalent URDF representation.

Links

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

mujoco_scene_editor-0.1.1.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mujoco_scene_editor-0.1.1-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

Details for the file mujoco_scene_editor-0.1.1.tar.gz.

File metadata

  • Download URL: mujoco_scene_editor-0.1.1.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mujoco_scene_editor-0.1.1.tar.gz
Algorithm Hash digest
SHA256 84d4993b51a3a34dc7a325e665f304f232bd2ea2796eedc13dac4e22295ed874
MD5 6499703e68038c6c915395a67a201f44
BLAKE2b-256 0327a2e0cf079647f2a975e31715cfe19c9521b878b520840d72f15161a443f5

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujoco_scene_editor-0.1.1.tar.gz:

Publisher: publish-to-test-pypi.yml on markusgrotz/mujoco-scene-editor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mujoco_scene_editor-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mujoco_scene_editor-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb285567ae6a1d59ee12d75ec4249f3e5d850d245f3579f7d113b504d3049c51
MD5 2b089cbc0a1ccec0440d7e8d761f3f0a
BLAKE2b-256 23be1ddd560282eda0f4e88ce7c3a8ab951c56a30358a14d3c32c46891952a54

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujoco_scene_editor-0.1.1-py3-none-any.whl:

Publisher: publish-to-test-pypi.yml on markusgrotz/mujoco-scene-editor

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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