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.0.tar.gz
(19.6 kB
view details)
File details
Details for the file kmv-0.3.0.tar.gz.
File metadata
- Download URL: kmv-0.3.0.tar.gz
- Upload date:
- Size: 19.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5d898bbf784bbdcaf42d3e7f5b33cc4b6457e2595e384f9829bdc6fc3cff2a1
|
|
| MD5 |
0d27689617bbc5b4ab9809154f9080e4
|
|
| BLAKE2b-256 |
575ead2534084c6882460ee657e69b25cbd9979afe59572bff0484f327a14b83
|
Provenance
The following attestation bundles were made for kmv-0.3.0.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.0.tar.gz -
Subject digest:
f5d898bbf784bbdcaf42d3e7f5b33cc4b6457e2595e384f9829bdc6fc3cff2a1 - Sigstore transparency entry: 229309757
- Sigstore integration time:
-
Permalink:
kscalelabs/kscale-mujoco-viewer@59c3188b16f27264a59189d9a6314ef868c6ecfc -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/kscalelabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@59c3188b16f27264a59189d9a6314ef868c6ecfc -
Trigger Event:
release
-
Statement type: