Metadata-Version: 2.5
Name: tabletask
Version: 0.1.0
Summary: Tabletop manipulation tasks as JSON, sampled and graded in MuJoCo
Project-URL: Homepage, https://table-task.com
Project-URL: Source, https://github.com/omarrayyann/tabletask
Author-email: Omar Rayyan <olr7742@nyu.edu>
License-Expression: MIT
License-File: LICENSE
Keywords: benchmark,manipulation,mujoco,robotics,simulation
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: msgspec
Requires-Dist: mujoco
Requires-Dist: numpy
Requires-Dist: pillow
Requires-Dist: scipy
Provides-Extra: all
Requires-Dist: coacd; extra == 'all'
Requires-Dist: daqp; extra == 'all'
Requires-Dist: mink; extra == 'all'
Requires-Dist: trimesh; extra == 'all'
Provides-Extra: control
Requires-Dist: daqp; extra == 'control'
Requires-Dist: mink; extra == 'control'
Provides-Extra: importing
Requires-Dist: coacd; extra == 'importing'
Requires-Dist: trimesh; extra == 'importing'
Description-Content-Type: text/markdown

# tabletask

A minimal format to author tabletop manipulation tasks in simulation, from
simple to complex, as jsons.

![tasks](https://github.com/user-attachments/assets/4aa5a007-2f82-4546-a281-3325b335b4a6)

Example:

```json
{
  "id": "robolab-banana_in_bowl",
  "instruction": "Pick up the banana and place it in the bowl.",
  "start": [
    ["on", "banana", "table"],
    ["on", "bowl", "table"]
  ],
  "goal": [
    ["inside", "banana", "bowl"]
  ]
}
```

Install:

```sh
pip install tabletask
```

Tasks ship with the package; the assets they name are fetched from the library
the first time a task asks for them and kept in `~/.cache/tabletask`, so an
install stays small. Set `TABLETASK_ASSETS` to keep them elsewhere, or
`TABLETASK_LIBRARY_URL` to serve them from somewhere else. Working in a
checkout, the assets beside you are used and nothing is fetched.

Usage:

```python
import tabletask
from tabletask.robots import Droid

env = tabletask.make("tasks/base/robolab-banana_in_bowl.json").add(Droid())
obs, info = env.reset()
action = [*obs["robot"]["joint_position"], 0.0]
obs, reward, terminated, truncated, info = env.step(action)
env.close()
```

MuJoCo runs the physics. `tabletask.make(task, monitor_interval=0.01)` sets how
often task conditions are checked, in seconds; you can also set
`env.monitor_interval` before stepping. The interval is rounded to physics steps
(minimum one) and does not change the physics timestep.

**Acknowledgement:**

Tasks ported from [ABC](https://github.com/amazon-far/abc) and
[RoboLab](https://github.com/NVlabs/RoboLab).

**Licence:** MIT, for the library and the tasks. The ported assets carry the
terms of where they came from; `assets/sources/` holds their manifests and
licence notices.
