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
- Integrate mujoco-rs to implement a native Rust loader similar to loader_urdf.rs
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
712c13663a0a23f3d4a0b5cb6460b780a7dd47d81f7b2a33b0f07cd0f3019cff
|
|
| MD5 |
1033767a49aee0066f4ec62f5487b023
|
|
| BLAKE2b-256 |
46e4415606e273ed3bcd377345cf850b5dc890f2f97202bca9eebc20a56ec323
|
File details
Details for the file rerun_loader_mjcf-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rerun_loader_mjcf-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5403658c1fa7e2157a3ef4e2c72a7ea06fc3ee14c8959301a008a33c664a82b7
|
|
| MD5 |
8fcd6a88473af6e03e7987452fe3030c
|
|
| BLAKE2b-256 |
d0dfee89cb75a32b8922a28a81f2ab0ecfed9bd8460c7f5e9bc5d643ba1db9cc
|