Metadata-Version: 2.4
Name: kmv
Version: 0.1.13
Summary: The kscale-mujoco-viewer project
Home-page: https://github.com/kscalelabs/kscale-mujoco-viewer
Author: Ali Kuwajerwala, Wesley Maa
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: attrs
Requires-Dist: imageio
Requires-Dist: mujoco
Requires-Dist: mujoco_mjx
Requires-Dist: numpy
Requires-Dist: omegaconf
Requires-Dist: Pillow
Requires-Dist: colorlogging
Requires-Dist: dearpygui
Requires-Dist: pyobjc-core>=8.5; platform_system == "Darwin"
Requires-Dist: pyobjc-framework-Cocoa>=8.5; platform_system == "Darwin"
Requires-Dist: pynput
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: darglint; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Dynamic: author
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# kscale-mujoco-viewer

Mujoco viewer maintained by K-Scale Labs.

Originally referenced from [mujoco-python-viewer](https://github.com/gaolongsen/mujoco-python-viewer).

## Installation

```bash
pip install kmv
```

## Examples

Run the humanoid example script to see the viewer in action:

```bash
# cd to the root of the repo
python examples/default_humanoid.py
```


## Usage

```python
import mujoco
from kmv.viewer import launch_passive

# Load model and create data
model = mujoco.MjModel.from_xml_path("path/to/model.xml")
data = mujoco.MjData(model)

# Run viewer
with launch_passive(model, data, make_plots=True) as viewer:
    # Setup camera and other options if needed
    viewer.setup_camera(render_distance=4.0, render_lookat=[0.0, 0.0, 1.0])
    
    while running_simulation:
        # Update physics
        mujoco.mj_step(model, data)
        
        # Update visualization
        viewer.update_and_sync()
```

