Metadata-Version: 2.4
Name: kos-sim
Version: 0.0.14
Summary: The simulator backend for the K-Scale Operating System (KOS)
Home-page: https://github.com/kscalelabs/kos-sim.git
Author: K-Scale Labs <ben@kscale.dev>
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: colorlogging
Requires-Dist: kscale
Requires-Dist: mujoco
Requires-Dist: mujoco-scenes
Requires-Dist: kmv
Requires-Dist: numpy
Requires-Dist: omegaconf
Requires-Dist: pykos
Requires-Dist: onnxruntime
Requires-Dist: scipy
Requires-Dist: mediapy
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"
Provides-Extra: examples
Requires-Dist: scipy; extra == "examples"
Requires-Dist: kinfer; extra == "examples"
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

# kos-sim

`kos-sim` is a pure-simulation backend for the [K-Scale Operating System (KOS)](https://github.com/kscalelabs/kos), using the same gRPC interface.

## Installation

```bash
pip install kos-sim
```

## Getting Started

First, start the `kos-sim` backend:

```bash
kos-sim kbot-v1
```

Then, in a separate terminal, run the example client:

```bash
python -m examples.kbot
```

You should see the simulated K-Bot move in response to the client commands.

## Possible Bugs

If you find that your robot is jittering on the ground, try increasing `iterations` and `ls_iterations` in your mjcf options.
```xml
<option iterations="6" ls_iterations="6">
</option>
```

Also, to clip actuator ctrl values, be sure to send a `configure_actuator` KOS command with `max_torque` set.
```python
await kos.actuator.configure_actuator(
    actuator_id=actuator.actuator_id,
    max_torque=actuator.max_torque,
)
```
