Metadata-Version: 2.4
Name: gym-taskboard
Version: 0.1.0
Summary: MuJoCo Gymnasium environments for the NIST robotic assembly task boards
Author-email: Andrea Ritossa <andre.ritossa@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/andrearitossa/gym-taskboard
Keywords: mujoco,gymnasium,robotics,reinforcement-learning,manipulation
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: gym_taskboard/assets/franka_emika_panda/LICENSE
Requires-Dist: mujoco>=3.3
Requires-Dist: gymnasium>=1.0
Requires-Dist: numpy
Requires-Dist: scipy
Provides-Extra: gui
Requires-Dist: aiohttp; extra == "gui"
Requires-Dist: Pillow; extra == "gui"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: imageio[ffmpeg]; extra == "dev"
Dynamic: license-file

# gym-taskboard

MuJoCo + Gymnasium environments of the [NIST assembly task boards](https://www.nist.gov/el/intelligent-systems-division-73500/robotic-grasping-and-manipulation-assembly/assembly),
manipulated by a Franka Panda. Implemented: **Task Board #1** (peg insertion, gear meshing,
electrical connectors, nut threading).

![Task-board GUI: orbiting the scene and jogging the Panda by keyboard](https://raw.githubusercontent.com/andrearitossa/gym-taskboard/main/docs/images/gui.gif)

```bash
uv venv --python 3.12 .venv && uv pip install --python .venv/bin/python -e '.[dev]'
.venv/bin/python -m pytest tests                  # mechanism + API tests
.venv/bin/python scripts/view.py --mode disassembly   # interactive viewer
.venv/bin/python scripts/demo_peg.py              # scripted Panda inserts a peg
```

```python
import gymnasium as gym, gym_taskboard

env = gym.make("TaskBoard1-Assembly-v0", obs_type="all")   # or a competency / part subset
obs, info = env.reset(seed=0)
obs, reward, terminated, truncated, info = env.step(env.action_space.sample())
print(info["score"], info["max_score"], info["parts"]["gear_small"])
```

Docs: [usage](https://github.com/andrearitossa/gym-taskboard/blob/main/docs/usage.md) · [architecture](https://github.com/andrearitossa/gym-taskboard/blob/main/docs/architecture.md) ·
[Task Board #1](https://github.com/andrearitossa/gym-taskboard/blob/main/docs/taskboard1.md) · [physics](https://github.com/andrearitossa/gym-taskboard/blob/main/docs/physics.md)

The browser GUI lives in the separate `taskboard_gui` package and uses the
environment as a client. Install its optional dependencies and launch it with:

```bash
uv pip install --python .venv/bin/python -e '.[gui]'
./gui.sh
# Or start the server directly:
MUJOCO_GL=egl .venv/bin/python -m taskboard_gui --http 8000 --port 5555
```

| Manual operator (keyboard IK jog) | Programmatic operator (JSON over TCP) |
|---|---|
| ![Manual mode](https://raw.githubusercontent.com/andrearitossa/gym-taskboard/main/docs/images/gui-manual.png) | ![Programmatic mode](https://raw.githubusercontent.com/andrearitossa/gym-taskboard/main/docs/images/gui-programmatic.png) |

Headless rendering: `MUJOCO_GL=egl`. The Panda model is from
[mujoco_menagerie](https://github.com/google-deepmind/mujoco_menagerie) (Apache-2.0).

## License

MIT, see [LICENSE](https://github.com/andrearitossa/gym-taskboard/blob/main/LICENSE). The bundled Panda model keeps its Apache-2.0 license.
