Metadata-Version: 2.5
Name: tabletask
Version: 0.2.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
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: dev
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: importing
Requires-Dist: coacd; extra == 'importing'
Requires-Dist: trimesh; extra == 'importing'
Provides-Extra: rtx
Requires-Dist: ovrtx; extra == 'rtx'
Requires-Dist: ovstage; extra == 'rtx'
Requires-Dist: usd-core; extra == 'rtx'
Description-Content-Type: text/markdown

## tabletask

A minimal, object-centric format to author tabletop manipulation tasks in simulation, from simple to complex.

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

A task says where things start and what must become true:

```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"]
  ]
}
```

![regions: a drawer, a mug handle, a conveyor belt, a crate, the compartments of a tea drawer, the slots of a dish rack, a pouring cup and the pegs of a mug tree](https://github.com/user-attachments/assets/8742a8dd-6889-49b4-808f-4ada43a58ecf)

Objects carry named regions that tasks place things in and check against.


### Installation

```sh
pip install tabletask
pip install "tabletask[control]"
pip install "tabletask[rtx]"
```


### Example

```python
import tabletask

env = tabletask.make("robolab-banana_in_bowl")
obs, info = env.reset(seed=0)

for _ in range(600):
    action = [*obs["robot"]["joint_position"], 0.0]
    obs, reward, terminated, truncated, info = env.step(action)
    if terminated or truncated:
        break

print("success:", info["success"])
env.close()
```

Several environments at once, each in its own process and renderer:

```python
envs = tabletask.make("robolab-banana_in_bowl", num_envs=8, gpus=[0])
observations, infos = envs.reset(episodes=range(8))
observations, rewards, terminated, truncated, infos = envs.step(actions)
envs.close()
```


### Acknowledgments

Tasks are ported from [ABC](https://github.com/amazon-far/abc) and
[RoboLab](https://github.com/NVlabs/RoboLab). The robot models come from
[MuJoCo Menagerie](https://github.com/google-deepmind/mujoco_menagerie).
