syncsim-rt2 / README.md
ohthatjeff's picture
Upload SyncSim RoboTwin 2.0 dataset
fa29853 verified
|
Raw History Blame Contribute Delete
5.22 kB
metadata
pretty_name: SyncSim RoboTwin 2.0
license: mit
tags:
  - robotics
  - world-model
  - bimanual
  - counterfactual
  - simulation
task_categories:
  - robotics
size_categories:
  - 10K<n<100K
configs:
  - config_name: default
    data_files: episodes.parquet

SyncSim RoboTwin 2.0

Bimanual manipulation episodes for world-model training, generated with the RoboTwin 2.0 simulator. Each episode pairs a successful scripted expert demonstration with counterfactual rollouts: replays of the same scene that are deliberately perturbed part-way through, so the dataset contains both what happens when the task is done right and many physically plausible ways it goes wrong.

  • 96,402 episodes, 4 robots, 50 tasks, ~2.0 TB
  • Per episode: 1 expert rollout, 4 counterfactual rollouts, 1 calibration sweep
  • Per rollout: 4 cameras (2 randomized third-person, 2 wrist), part-segmentation masks, actions, joint states, object poses and per-frame contacts

Contents

Robot Episodes Sets
aloha-agilex 25,202 clean_50, randomized_500
arx-x5 24,771 clean_50, randomized_500
ur5 (WSG gripper) 23,531 clean_50, randomized_500
franka 22,898 clean_50, randomized_500

clean scenes use RoboTwin's default appearance; randomized scenes use its domain randomization (textures, lighting, clutter). Seeds and expert trajectories follow the RoboTwin 2.0 release; some seeds were dropped when the expert or scene failed (reasons in meta/dropped/).

Counterfactual types

Mode What is perturbed
noisy_replay noise added to the expert's actions from a breakpoint on
scripted_diverge the arm is sent along a different scripted motion
freeze_arm one arm stops at the breakpoint
gripper_flip the gripper opens or closes at the wrong time
grasp_miss the reach toward the object is offset so the grasp misses

Counterfactuals are kept only if they diverge measurably from the expert and stay physically plausible (bounded end-effector speed). Each counterfactual's metadata.json records the mode, the perturbed arm(s), the breakpoint, divergence statistics and whether the task still succeeded.

Layout

episodes.parquet                     one row per episode (filterable index, shown in the viewer)
index/<set>__<task>.jsonl            same, with per-counterfactual details
data/<set>/<task>/<set>__<task>__NNNN.tar   episodes, uncompressed tar shards of <= 2 GB
meta/dropped/<set>__<task>.json      seeds dropped during generation, with reasons

An episode is never split across shards. Inside a shard, files keep their original paths:

<set>/<task>/episode_<i>/
  instructions.json                  natural-language instructions (seen / unseen)
  release.json                       provenance in the RoboTwin 2.0 release
  camera_poses_0/
    base_init.json                   scene, embodiment, fps, action layout, generation config
    views.json                       camera intrinsics / extrinsics (third-person and wrist)
    expert_stream.npz                expert control stream
    expert/  calibration/  counterfactual_000..003/
      metadata.json                  rollout metadata (success, frames, fps, mode, ...)
      actions.npy                    [T, 16] per arm: TCP xyz, quat xyzw, gripper opening
      joints.npy                     joint positions
      pose.pkl                       per-frame TCP and gripper poses
      object_poses.npz               per-frame object poses
      contacts.json / contacts.npz   per-frame part-pair contacts and held windows
      masks.json                     mask label table
      agentview_rgb/   agentview_rgb_1/   wrist_left_rgb/   wrist_right_rgb/
        video.mp4                    RGB
        mask.mkv                     lossless FFV1 gray8, pixel value = part id (0 = none)

Conventions: quaternions on disk are xyzw; poses are in the world frame; the gripper value is the commanded opening in [0, 1] (1 = open). The exact action layout is in base_init.json["action_layout"]. Absolute paths from the generation machine are replaced with placeholders such as <data_root>.

Usage

Pick episodes with the index, download only the shards you need, and read them with tarfile:

import tarfile
import pandas as pd
from huggingface_hub import hf_hub_download

REPO = "ohthatjeff/syncsim-rt2"
eps = pd.read_parquet(hf_hub_download(REPO, "episodes.parquet", repo_type="dataset"))
sel = eps[(eps.robot == "franka") & (eps.task == "hanging_mug")]

shard = hf_hub_download(REPO, sel.shard.iloc[0], repo_type="dataset")
with tarfile.open(shard) as tar:
    tar.extractall("syncsim")   # -> syncsim/<set>/<task>/episode_<i>/...

To download everything (about 2 TB):

hf download ohthatjeff/syncsim-rt2 --repo-type dataset --local-dir syncsim_rt2
for t in syncsim_rt2/data/*/*/*.tar; do tar -xf "$t" -C syncsim_rt2/extracted; done

Acknowledgements

Scenes, assets, tasks and expert trajectories come from RoboTwin 2.0; please also cite and follow the licenses of RoboTwin and its assets.