The kscale-mujoco-viewer project
Project description
kscale-mujoco-viewer
Mujoco viewer maintained by K-Scale Labs.
https://github.com/user-attachments/assets/5312fa03-7215-4c1b-9d66-acaa18b96a3c
Installation
pip install kmv
Examples
Run the humanoid example script to see the viewer in action:
# cd to the root of the repo
python examples/default_humanoid.py
Usage
import mujoco, time
from kmv.app.viewer import QtViewer
model = mujoco.MjModel.from_xml_path("path/to/model.xml")
data = mujoco.MjData(model)
viewer = QtViewer(model)
while viewer.is_open:
mujoco.mj_step(model, data)
# send state
viewer.push_state(data.qpos, data.qvel, sim_time=data.time)
# send a few scalars to the “Debug” plot group
viewer.push_plot_metrics(
scalars={
"qpos0": float(data.qpos[0]),
"qvel0": float(data.qvel[0]),
},
group="Debug",
)
time.sleep(model.opt.timestep)
viewer.close()
Acknowledgements
Originally referenced from mujoco-python-viewer.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kmv-0.3.13.tar.gz
(21.0 kB
view details)
File details
Details for the file kmv-0.3.13.tar.gz.
File metadata
- Download URL: kmv-0.3.13.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9379247da9203b21ea586f9338d55cc87dbd25f2009d32af063744d508c09924
|
|
| MD5 |
4af162005c04afee13e9a7c19432b515
|
|
| BLAKE2b-256 |
3ab2f3e51e848b510545a968d44e35bd5587a064320ac485ce9f960c9fee8414
|
Provenance
The following attestation bundles were made for kmv-0.3.13.tar.gz:
Publisher:
publish.yml on kscalelabs/kscale-mujoco-viewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kmv-0.3.13.tar.gz -
Subject digest:
9379247da9203b21ea586f9338d55cc87dbd25f2009d32af063744d508c09924 - Sigstore transparency entry: 230085057
- Sigstore integration time:
-
Permalink:
kscalelabs/kscale-mujoco-viewer@7311f452e532101f4d2cdf2f582569e48931461d -
Branch / Tag:
refs/tags/0.3.13 - Owner: https://github.com/kscalelabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7311f452e532101f4d2cdf2f582569e48931461d -
Trigger Event:
release
-
Statement type: