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 --model-name path/to/scene.xml
mjedit --model-name path/to/scene.json

# 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 --model-name examples/prompt/scene_chemistry_lab.xml

# With uv (no install)
uv run mjedit --model-name 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 --model-name 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.0.1.tar.gz (22.5 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.0.1-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mujoco_scene_editor-0.0.1.tar.gz
  • Upload date:
  • Size: 22.5 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.0.1.tar.gz
Algorithm Hash digest
SHA256 29b159b800dddc131dcf23fb21182683311ea557a836824cd2ae62febabf61f3
MD5 6998fd6ccf147819fec3b7d01e5c45a7
BLAKE2b-256 687f141e07db74ff588bf0e7c039795f94a5b147057832b0bfc9c2b244fbda89

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujoco_scene_editor-0.0.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.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mujoco_scene_editor-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 92c424eceaad0872b9a779ad198f38592ddc171204c1f2a35b5165df66ec9d86
MD5 22a68d3a50609dd7ddae9d81ec6b4f68
BLAKE2b-256 9b382b347fe03cde7f356d50bc4cf673b606df00f6f38e0c84c3de4583b06931

See more details on using hashes here.

Provenance

The following attestation bundles were made for mujoco_scene_editor-0.0.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