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()
Troubleshooting
If you have issues with linux machines that have both integrated and nvidia GPUs, you may need to set these environment variables to force use of the nvidia GPU.
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia python examples/default_humanoid.py
You may also have to install the following utilities:
sudo apt install libxcb-cursor0 libxcb-cursor-dev
Additionally, depending on your setup, you may need to set the right environment variables to run the viewer properly. See this issue for more details.
QT_QPA_PLATFORM=wayland python examples/default_humanoid.py
Acknowledgements
Originally referenced from mujoco-python-viewer.
Metadata
Release files for mjviewer 0.3.23
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mjviewer-0.3.23.tar.gz | 28.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mjviewer-0.3.23-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 60.7 kB
Release files / mjviewer-0.3.23.tar.gz
| Download URL | mjviewer-0.3.23.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f1dfc44ea5e531e8fb84fd5fb78b379ade345d8b599948ad97c6179d9d29431
|
|
BLAKE2b-256 checksum How to use checksums |
5d7bc7a3b078f02dc7b58c9704cfd873feacb98916bec6651fe4ba55a2cc0e2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / mjviewer-0.3.23-py3-none-any.whl
| Download URL | mjviewer-0.3.23-py3-none-any.whl |
|---|---|
| Size | 32.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
473089839d51ed388173bd037c5885854d1fa48b7e30657dedce9613ff915d16
|
|
BLAKE2b-256 checksum How to use checksums |
6fd4281abff83d4dad20ccdf0473ac26595dd1e4858df0b216245e484dacb51a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for mjviewer 0.3.23
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.