Skip to main content

A Rerun data loader for MJCF (MuJoCo XML) files

Project description

rerun-loader-mjcf

A Rerun external data loader for MJCF (MuJoCo XML) files.

Installation

pip install rerun-loader-mjcf

Usage

CLI

rerun-loader-mjcf robot.xml

Python API

import mujoco
import rerun as rr
import rerun_loader_mjcf

model = mujoco.MjModel.from_xml_path("robot.xml")
data = mujoco.MjData(model)

rr.init("mjcf_viewer", spawn=True)
logger = rerun_loader_mjcf.MJCFLogger(model)

rr.set_time("frame", sequence=0)
logger.log_model()

data.qpos[0] += 0.5
mujoco.mj_forward(model, data)

rr.set_time("frame", sequence=1)
logger.log_data(data)

Lint

uv run pre-commit run -a

Credits

Inspired by rerun-loader-python-example-urdf.

What's Next

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

rerun_loader_mjcf-0.2.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

rerun_loader_mjcf-0.2.0-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file rerun_loader_mjcf-0.2.0.tar.gz.

File metadata

  • Download URL: rerun_loader_mjcf-0.2.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for rerun_loader_mjcf-0.2.0.tar.gz
Algorithm Hash digest
SHA256 712c13663a0a23f3d4a0b5cb6460b780a7dd47d81f7b2a33b0f07cd0f3019cff
MD5 1033767a49aee0066f4ec62f5487b023
BLAKE2b-256 46e4415606e273ed3bcd377345cf850b5dc890f2f97202bca9eebc20a56ec323

See more details on using hashes here.

File details

Details for the file rerun_loader_mjcf-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for rerun_loader_mjcf-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5403658c1fa7e2157a3ef4e2c72a7ea06fc3ee14c8959301a008a33c664a82b7
MD5 8fcd6a88473af6e03e7987452fe3030c
BLAKE2b-256 d0dfee89cb75a32b8922a28a81f2ab0ecfed9bd8460c7f5e9bc5d643ba1db9cc

See more details on using hashes here.

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