Metadata-Version: 2.5
Name: roborouter
Version: 0.0.1
Summary: Run a robot on any model with a key and one call.
Author: Momentum
License: Apache-2.0
Keywords: models,momentum,robotics
Requires-Python: >=3.11
Requires-Dist: httpx>=0.28
Requires-Dist: msgpack>=1.0
Provides-Extra: dev
Requires-Dist: pytest>=9.1; extra == 'dev'
Requires-Dist: ruff>=0.16; extra == 'dev'
Description-Content-Type: text/markdown

# RoboRouter

Run a robot, in a simulator or the real world, on any model with a key and one call.

**Not ready for use yet.** The service isn't open to new users, and the only model so far is a test script.

```bash
pip install roborouter
export MOMENTUM_API_KEY=fw_cli_...   # Settings, Workspace API keys
```

```python
import roborouter

config = {"model": "momentum/scripted"}

while True:
    state = {"joints": read_my_joints(), "images": {"top": read_my_camera_jpeg()}}
    reply = roborouter.control_robot(config, state, "pick up the fork")
    if reply.finished:
        break
    move_my_robot(reply.joints)
```

`joints` is a map of your joint names to their positions, for any number of arms. `images` is optional, and each frame is JPEG bytes. `momentum/scripted` nudges every joint a little for a few moves and then finishes, so you can check the loop with no model provider involved.

**With no details from you, nothing checks the targets.** A bad reply moves the arm as far as your robot's own limits allow. `control_robot` raises `RoboRouterError` when it can't get an answer, so hold your robot on an exception.

`control_robot` drives one robot per process. For several robots, give each its own `roborouter.Router()` and call `router.control_robot(...)`.

`reply.usage` has tokens and cost. `reply.timings` has the time each stage took, in milliseconds.
