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.12.tar.gz
(21.0 kB
view details)
File details
Details for the file kmv-0.3.12.tar.gz.
File metadata
- Download URL: kmv-0.3.12.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 |
cdb76874563dc623780ccc780851c6856a139e3c48b70ef2345ba95bc7e46dd8
|
|
| MD5 |
bfe6d9047c2038e6db4501a35b544362
|
|
| BLAKE2b-256 |
bbc7115233cf9dbd4d6834b563c7ff5bea88217b2066e226fe9819f5c1bdc711
|
Provenance
The following attestation bundles were made for kmv-0.3.12.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.12.tar.gz -
Subject digest:
cdb76874563dc623780ccc780851c6856a139e3c48b70ef2345ba95bc7e46dd8 - Sigstore transparency entry: 229979391
- Sigstore integration time:
-
Permalink:
kscalelabs/kscale-mujoco-viewer@705921230f63d2b9c563220bc7ca515fe987b041 -
Branch / Tag:
refs/tags/0.3.12 - Owner: https://github.com/kscalelabs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@705921230f63d2b9c563220bc7ca515fe987b041 -
Trigger Event:
release
-
Statement type: