---
title: Motubrain-Astribot-S1
canonical_url: "https://www.modelscope.cn/datasets/GensPI/Motubrain-Astribot-S1"
md_url: "https://www.modelscope.cn/datasets/GensPI/Motubrain-Astribot-S1.md"
repository: GensPI/Motubrain-Astribot-S1
last_updated: 2026-11-28
license: cc-by-nc-sa-4.0
storage_size: "1.7 TB"
downloads: 34970
stars: 0
---

# Motubrain-Astribot-S1

> Motubrain-Astribot-S1 - GensPI 在 ModelScope 开源的数据集。Motubrain Astribot S1 Dataset

GensPI/Motubrain-Astribot-S1 是 ModelScope 魔搭社区上的数据集，存储大小 1.7 TB，采用 cc-by-nc-sa-4.0 许可。

- **Repository**: GensPI/Motubrain-Astribot-S1
- **License**: cc-by-nc-sa-4.0
- **Storage size**: 1.7 TB
- **Downloads**: 34970
- **Stars**: 0
- **Last updated**: 2026-11-28

Source: https://www.modelscope.cn/datasets/GensPI/Motubrain-Astribot-S1

---

# Motubrain Astribot S1 Dataset

**Real-world robot demonstrations in MBDF and LeRobot v3**

[Motubrain](https://www.motubrain.com/) · [ModelScope dataset](https://modelscope.cn/datasets/GensPI/Motubrain-Astribot-S1) · [Hugging Face mirror](https://huggingface.co/datasets/GensPI/Motubrain-Astribot-S1)

![Three synchronized MBDF camera views](assets/mbdf_three_view_preview_mono.gif)

*A straw-insertion demonstration: head view above, left and right wrist views below.*

## Overview

The Motubrain Astribot S1 dataset brings together real-world demonstrations of everyday manipulation: organizing objects, pouring liquids, inserting objects, opening and closing containers, using tools, and coordinating both arms. It pairs three-view RGB video with robot trajectories, camera calibration, and language grounded in the episode timeline.

This repository provides the demonstrations in **Motubrain Dataset Format (MBDF)** and **LeRobot v3** for world-model learning, visuomotor policy learning, and language-conditioned manipulation. MBDF organizes each episode as directly inspectable MP4, PyTorch, and JSON files. LeRobot v3 exposes the same interactions through frame-level Parquet tables, structured metadata, and an official dataset reader.

**Release status:** data files are being prepared for upload. The planned open release covers **1,000 hours**, counted once per robot interaction rather than once per camera. The schemas and examples below describe the prepared data in both formats; downloadable coverage follows the files available in this repository.

### Highlights

- **Three complementary views:** one head camera for scene context and two wrist cameras for close-range manipulation.
- **Robot trajectories:** joint configurations, end-effector poses, gripper signals, and available torso, head, and chassis channels.
- **Rig-specific camera calibration:** image-resolution-matched intrinsics and frame-aligned camera poses computed from the calibrated mounts and robot kinematics.
- **Temporally grounded English language:** coarse task descriptions, medium captions, fine captions, and supplementary atomic-action tracks for the left arm, right arm, and head.
- **Staged quality screening:** structural and motion filtering, automated embodied-data checks, human visual review, and face de-identification.

## Release Formats

| Format | Repository location | Reading interface |
| --- | --- | --- |
| MBDF | `MBDF/<task_name>/<episode_name>/` | Direct MP4, PyTorch, and JSON access. |
| LeRobot v3 | `LeRobot/<merged_task_name>/` | Official LeRobot reader plus explicit annotation and calibration tables. |

Both representations preserve episode identities, three-view observations, English captions, and camera calibration. The same demonstrations are counted only once in the release duration.

## Get Started with MBDF

Install the small set of packages needed for downloading and inspecting MBDF:

```bash
pip install modelscope-hub torch numpy opencv-python
```

### Download the Dataset

```python
from modelscope_hub import HubApi

api = HubApi(endpoint="https://modelscope.cn")

root = api.download_repo(
    repo_id="GensPI/Motubrain-Astribot-S1",
    repo_type="dataset",
    local_dir="motubrain_astribot_s1",
    allow_patterns=["MBDF/**"],
)
```

For one episode, enumerate only its directory and download those files with the native ModelScope SDK:

```python
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path

from modelscope_hub import HubApi

api = HubApi(endpoint="https://modelscope.cn")
repo_id = "GensPI/Motubrain-Astribot-S1"
task = "Pretrain_XC01_insert_straw_2_260901_05_specialized_2"
episode = "episode_20260901_185159_1"
root = Path("motubrain_astribot_s1")
prefix = f"MBDF/{task}/{episode}"
files = []
for page, entries, error in api.legacy.iter_dataset_file_pages(
    repo_id, revision="master", root_path="/" + prefix,
):
    if error:
        raise error
    files.extend(entry for entry in entries if entry["Type"] == "blob")

def download_file(entry):
    return api.download_file(
        repo_id, repo_type="dataset", file_path=entry["Path"],
        revision="master", local_dir=root, file_size=entry["Size"],
    )

with ThreadPoolExecutor(max_workers=4) as pool:
    list(pool.map(download_file, files))
print("Downloaded to:", root / prefix)
```

## MBDF Dataset Structure

### Directory Layout

```text
MBDF/
└── <task_name>/
    └── <episode_name>/
        ├── raw_video/
        │   ├── cam_high.mp4
        │   ├── cam_left_wrist.mp4
        │   └── cam_right_wrist.mp4
        ├── state.pt
        ├── camera.pt
        ├── meta.json
        ├── instructions.json
        ├── atomic_v11.json
        ├── filter.json
        └── filter.pt
```

The three MP4s are the released, face-de-identified videos. The directory name `raw_video` is part of the MBDF layout; it does not identify an unredacted video source.

Task identifiers retain the physical robot ID and collection identifiers while using English task names, for example `Pretrain_XC011_hang_electronic_scale_260907_01`. `XC011` is the collection-name spelling for physical unit XC11. A task directory groups recorded episodes; it is distinct from the natural-language task description inside each episode.

### Core Storage Rules

1. One episode directory represents one robot interaction, observed by three cameras.
2. Videos and time-dependent tensors share the episode frame index. The released videos use a **30 FPS** timeline; frame `i` corresponds to `i / 30` seconds relative to the episode start.
3. JSON annotation boundaries are zero-based and **inclusive**: `[start_frame, end_frame]`. The equivalent Python slice is `start_frame:end_frame + 1`.
4. All three camera poses change with robot configuration. Do not replace the per-frame poses with one episode-wide transform.
5. Camera intrinsics already correspond to the stored video pixels. Do not scale them again using a source calibration resolution.

Temporal alignment to a 30 FPS video does not establish the native acquisition rate of every sensor or sub-frame annotation accuracy.

## MBDF Episode Files

| File | Content |
| --- | --- |
| `raw_video/*.mp4` | Three RGB views of the same episode. |
| `state.pt` | Named, frame-aligned robot trajectory tensors. |
| `camera.pt` | Intrinsic matrices and per-frame camera poses for the three views. |
| `meta.json` | Camera model, distortion, coordinate conventions, resolution, and calibration metadata. |
| `instructions.json` | English coarse, medium, and fine captions with frame intervals. |
| `atomic_v11.json` | Body-part-specific atomic actions and descriptions with frame intervals. |
| `filter.json` | Episode filtering decision, metrics, and artifact descriptions. |
| `filter.pt` | Frame-level filtering outputs. |

## MBDF Robot Trajectories

`state.pt` is a dictionary. Its leading dimension `T` is the number of episode frames. The prepared Astribot S1 data uses the following fields:

| Key | Shape | Description |
| --- | --- | --- |
| `qpos` | `(T, 20)` | Joint configuration, concatenated in torso, left arm, right arm, head order. |
| `qpos_torso` | `(T, 4)` | Torso joint configuration. |
| `qpos_left`, `qpos_right` | `(T, 7)` each | Left and right arm joint configurations. |
| `qpos_head` | `(T, 2)` | Head joint configuration. |
| `gripper_left`, `gripper_right` | `(T, 1)` each | Recorded gripper signals. |
| `endpose_left`, `endpose_right`, `endpose_torso` | `(T, 9)` each | Three position components followed by a continuous 6D rotation representation. |
| `chassis` | `(T, 3)` | Recorded chassis channel. |
| `__canonical55__` | `(T, 55)` | A shared layout of robot features, including padded dimensions. |
| `__canonical55_mask__` | `(T, 55)` | Feature-validity mask for the shared layout; 1 denotes a represented valid entry and 0 a masked entry. |

These are trajectory features, not a declaration that the robot has 55 independently actuated joints. The canonical validity mask and the temporal filtering outputs in `filter.pt` serve different purposes. Do not infer that every canonical dimension is valid or that every temporal filtering output uses the same mask convention.

The named gripper signals should not be treated as binary open/closed labels merely because their values fall within a particular range. Choose and document the gripper convention and normalization used by your downstream training pipeline.

## MBDF Camera Data and Calibration

### Three Released Views

| Camera key | View | Stored resolution | Video timeline |
| --- | --- | --- | --- |
| `cam_high` | Head | 1280 × 720 | 30 FPS |
| `cam_left_wrist` | Left wrist | 640 × 360 | 30 FPS |
| `cam_right_wrist` | Right wrist | 640 × 360 | 30 FPS |

Only these three RGB views are included in this release.

### `camera.pt`

The file is keyed by the camera names above. Each entry contains:

```python
camera["cam_high"]["intrinsic"]  # float32, shape (3, 3)
camera["cam_high"]["extrinsic"]  # float32, shape (T, 4, 4)
```

The intrinsic matrix is in **stored-image pixels**:

```text
K = [[fx,  0, cx],
     [ 0, fy, cy],
     [ 0,  0,  1]]
```

In particular, the wrist matrices have already been scaled to **640 × 360**. The distortion coefficients belong to the released camera model and do not receive the same pixel scaling as `fx`, `fy`, `cx`, and `cy`.

### Transform Direction and Coordinate Frames

`extrinsic[t]` is `T_base_camera_body`: it maps homogeneous camera-body coordinates to the robot base frame `astribot_torso_base` at frame `t`:

```text
p_base = T_base_camera_body[t] @ p_camera_body
```

Camera-body axes are **x forward, y left, z up**. Image projection instead uses optical axes **x right, y down, z forward**. Translation is in metres. These transforms are robot-base-relative poses, not global world-frame localization.

For a base-frame point, use `T_optical_base = optical_from_body @ inverse(T_base_body)`. The complete MBDF example below loads the required files, defines an example point, and performs the transform entirely in NumPy `float64`.

Use `K` and the declared distortion model to project the resulting optical coordinates. Do not apply the intrinsic matrix directly to camera-body coordinates.

### `meta.json`

The calibration description is under `resolved_config.camera_calibration`. Useful fields include:

- `root_frame`, `output_frame`, `translation_unit`, and `optical_from_body` for coordinate interpretation.
- `cameras.<camera>.video_resolution` and `intrinsic` for the stored-image geometry.
- `cameras.<camera>.model`, `distortion`, and `distortion_parameter_names` for the lens model.
- `cameras.<camera>.rectification_applied` to distinguish distorted from rectified imagery.
- `cameras.<camera>.parent_link` and `T_parent_optical` for the calibrated camera mount relative to its kinematic parent.

The released video geometry is described as resized, full-field-of-view imagery with `rectification_applied: false`. The stored distortion uses the OpenCV Brown–Conrady coefficient order `[k1, k2, p1, p2, k3]`. Use the per-rig coefficients rather than one calibration shared across all robot units.

## MBDF Language Annotations

The dataset uses **three caption granularities plus supplementary body-part atomic-action tracks**. The fine-caption level and the body-part atomic-action tracks are distinct annotations; they do not define one strictly nested four-level temporal tree.

### `instructions.json`

| Key | Meaning |
| --- | --- |
| `coarse_en` | Episode-level task description. |
| `medium_en` | Intermediate task steps or coordinated sequences. |
| `fine_en` | Short-horizon action descriptions with finer temporal boundaries. |

Each list contains records with `instruction`, `start_frame`, and `end_frame`. Records may also include `behavior`, `LRbehavior`, `environment`, and `robot`. For reading a segment's text, use **`instruction`**; the other text fields provide contextual information and are not substitutes for its frame-specific caption.

Below is an abbreviated excerpt from a 293-frame straw-insertion episode:

```json
{
  "coarse_en": [
    {
      "start_frame": 0,
      "end_frame": 292,
      "instruction": "Insert the metal straw on the table into the cup with the lid."
    }
  ],
  "medium_en": [
    {
      "start_frame": 0,
      "end_frame": 292,
      "instruction": "The left arm grasps the metal straw on the left side of the table and hands it to the right arm; the right arm inserts the straw into the lid hole of the green cup with a lid on the table."
    }
  ],
  "fine_en": [
    {
      "start_frame": 67,
      "end_frame": 126,
      "instruction": "The left arm holds the straw, moves it to the middle and hands it to the right arm; the right arm closes its gripper to catch the straw, then the left arm releases."
    }
  ]
}
```

Only selected records and fields are shown; the episode file contains the full annotation lists.

### `atomic_v11.json`

The top-level object includes `task`, `episode_id`, `num_frames`, and a `fines` list. Each `fines` entry associates a fine interval with a `skill`, a descriptive `instruction`, and three body-part lists: `left_arm`, `right_arm`, and `head`.

An atomic-action record can contain:

```json
{
  "start_frame": 0,
  "end_frame": 13,
  "atomic_action": "Idle",
  "target": null,
  "target_part": null,
  "motion_direction": null,
  "approach_direction": null,
  "reference_frame": null,
  "caption": "The left arm stops on the left side of the table edge and stays still.",
  "short_events": []
}
```

Action types include examples such as `Reach`, `Grasp`, `Transport`, `Insert`, `Release`, and `Idle`. Different body parts can act concurrently, so their intervals can overlap. A null action label denotes an unspecified or unobservable action; it should not be silently converted to `Idle`. Text such as `motion_direction` may refer to the image view rather than a metric vector; read `reference_frame` when present.

Use the explicit numeric `start_frame` and `end_frame` fields for alignment to the 30 FPS episode timeline.

## Read One MBDF Episode

The following example loads trajectories, calibration, captions, atomic actions, and the same frame from all three videos. It requires no private storage client or project-specific dataloader.

```python
import json
from pathlib import Path

import cv2
import numpy as np
import torch

task = "Pretrain_XC01_insert_straw_2_260901_05_specialized_2"
episode = "episode_20260901_185159_1"
ep = Path("motubrain_astribot_s1") / "MBDF" / task / episode

state = torch.load(ep / "state.pt", map_location="cpu", weights_only=True)
camera = torch.load(ep / "camera.pt", map_location="cpu", weights_only=True)
meta = json.loads((ep / "meta.json").read_text(encoding="utf-8"))
instructions = json.loads((ep / "instructions.json").read_text(encoding="utf-8"))
atomic = json.loads((ep / "atomic_v11.json").read_text(encoding="utf-8"))

T = len(state["qpos"])
frame = T // 2
print("frames:", T, "duration (seconds):", T / 30)
print("qpos:", tuple(state["qpos"].shape))

for level in ("coarse_en", "medium_en", "fine_en"):
    active = [
        item["instruction"] for item in instructions.get(level, [])
        if item["start_frame"] <= frame <= item["end_frame"]
    ]
    print(level, active)

for body_part in ("left_arm", "right_arm", "head"):
    active = [
        item
        for fine in atomic["fines"]
        for item in fine.get(body_part, [])
        if item["start_frame"] <= frame <= item["end_frame"]
    ]
    print(body_part, [(item.get("atomic_action"), item.get("caption")) for item in active])

rgb_frames = {}
calibration = meta["resolved_config"]["camera_calibration"]
for name in ("cam_high", "cam_left_wrist", "cam_right_wrist"):
    K = np.asarray(camera[name]["intrinsic"], dtype=np.float64)
    poses = np.asarray(camera[name]["extrinsic"], dtype=np.float64)
    assert K.shape == (3, 3) and poses.shape == (T, 4, 4)
    assert np.isfinite(K).all() and np.isfinite(poses).all()

    cap = cv2.VideoCapture(str(ep / "raw_video" / f"{name}.mp4"))
    assert cap.isOpened(), name
    assert int(cap.get(cv2.CAP_PROP_FRAME_COUNT)) == T
    cap.set(cv2.CAP_PROP_POS_FRAMES, frame)
    ok, bgr = cap.read()
    cap.release()
    assert ok, (name, frame)
    width, height = calibration["cameras"][name]["video_resolution"]
    assert bgr.shape[:2] == (height, width)
    rgb_frames[name] = cv2.cvtColor(bgr, cv2.COLOR_BGR2RGB)
    print(name, rgb_frames[name].shape, K.tolist())

# Transform an example base-frame point (metres) into head-camera optical coordinates.
optical_from_body = np.asarray(calibration["optical_from_body"], dtype=np.float64)
T_base_body = np.asarray(camera["cam_high"]["extrinsic"][frame], dtype=np.float64)
p_base_homogeneous = np.array([1.0, 0.0, 0.0, 1.0], dtype=np.float64)
T_optical_base = optical_from_body @ np.linalg.inv(T_base_body)
p_optical = T_optical_base @ p_base_homogeneous
assert np.allclose(np.linalg.solve(T_optical_base, p_optical), p_base_homogeneous)
print("example optical point (metres):", p_optical[:3])
```

To access filtering artifacts separately:

```python
filter_report = json.loads((ep / "filter.json").read_text(encoding="utf-8"))
filter_outputs = torch.load(ep / "filter.pt", map_location="cpu", weights_only=True)
print(filter_report["decision"])
print({key: tuple(value.shape) for key, value in filter_outputs.items()})

for group in ("action", "all", "segment"):
    flags = filter_outputs[f"{group}_total"].bool()
    assert flags.shape == (T,)
    assert int(flags.sum()) == filter_report["total"][group]["n_invalid"]
```

For the aggregate `action_total`, `all_total`, and `segment_total` outputs, **True marks a flagged frame**, not a frame to keep. The individual rule outputs also include diagnostic arrays and should not all be interpreted as drop masks. Episode-level acceptance and frame-level selection are separate: an accepted episode can, for example, carry endpoint-waiting flags.

The example reads the recorded trajectory without silently removing frames or changing the annotation timeline. Downstream temporal filtering, target construction, and normalization remain explicit training choices.

## LeRobot v3

The LeRobot v3 representation packages the same reviewed, face-de-identified demonstrations as frame-level Parquet tables, three-camera MP4 files, and structured metadata. It is prepared for loading with the **official LeRobot 0.4.4 reader**. MBDF and LeRobot are two representations of the same interactions; their durations must not be added together.

Recordings of the same task on the same physical robot are merged into a task subset, such as `Pretrain_XC011_hang_electronic_scale`. Each subset is a complete LeRobot dataset with `robot_type: astribot_s1`. Its episode metadata retains the identity of each original MBDF recording.

### Download a Task Subset

```python
from concurrent.futures import ThreadPoolExecutor
from pathlib import Path

from modelscope_hub import HubApi

api = HubApi(endpoint="https://modelscope.cn")
repo_id = "GensPI/Motubrain-Astribot-S1"
task = "Pretrain_XC011_hang_electronic_scale"
root = Path("motubrain_astribot_s1")
prefix = f"LeRobot/{task}"
files = []
for page, entries, error in api.legacy.iter_dataset_file_pages(
    repo_id, revision="master", root_path="/" + prefix,
):
    if error:
        raise error
    files.extend(entry for entry in entries if entry["Type"] == "blob")

def download_file(entry):
    return api.download_file(
        repo_id, repo_type="dataset", file_path=entry["Path"],
        revision="master", local_dir=root, file_size=entry["Size"],
    )

with ThreadPoolExecutor(max_workers=4) as pool:
    list(pool.map(download_file, files))
print("Downloaded to:", root / prefix)
```

This lists only the selected subset, avoiding a whole-repository listing. Download the complete subset before loading it. To download all task subsets instead, set `prefix = "LeRobot"`; that intentionally enumerates the entire LeRobot representation.

### Directory Layout

```text
LeRobot/
└── <merged_task_name>/
    ├── meta/
    │   ├── info.json
    │   ├── stats.json
    │   ├── tasks.parquet
    │   ├── subtasks.parquet
    │   ├── chunk_000/
    │   │   ├── tasks.parquet
    │   │   ├── medium.parquet
    │   │   ├── subtasks.parquet
    │   │   └── atomic_actions.parquet
    │   └── episodes/
    │       └── chunk-000/
    │           └── file-000.parquet
    ├── data/
    │   └── chunk-000/
    │       ├── file-000.parquet
    │       ├── file-001.parquet
    │       └── ...
    └── videos/
        ├── observation.images.cam_high/
        │   └── chunk-000/file-000.mp4, ...
        ├── observation.images.cam_left_wrist/
        │   └── chunk-000/file-000.mp4, ...
        └── observation.images.cam_right_wrist/
            └── chunk-000/file-000.mp4, ...
```

`meta/chunk_000/` contains the annotation tables. The root-level `meta/tasks.parquet` and `meta/subtasks.parquet` are matching copies retained for the official 0.4.4 reader. These are not two different annotation versions.

Resolve frame and video files through `meta/info.json` and the episode metadata. Do not infer an episode's file location from its episode index alone. The illustrated `chunk-000` directories can extend to further chunks as a subset grows.

### Core Metadata and Frame Features

`meta/info.json` declares the schema, `fps`, `robot_type`, totals, splits, and `data_path`/`video_path` templates. `meta/episodes/chunk-*/file-*.parquet` stores episode lengths, frame ranges, video offsets, statistics, identities, and camera calibration.

| Frame feature | Shape or type | Meaning |
| --- | --- | --- |
| `observation.state` | 25 float32 values | Left arm joints and gripper, right arm joints and gripper, torso joints, head joints, and chassis channels. |
| `action` | 25 float32 values | Released action targets, with the same feature order as `observation.state`. |
| `observation.eef` | 18 float32 values | Left and right end-effector positions and continuous 6D rotations. |
| `observation.images.cam_high` | RGB video | Head-camera view. |
| `observation.images.cam_left_wrist` | RGB video | Left-wrist view. |
| `observation.images.cam_right_wrist` | RGB video | Right-wrist view. |
| `timestamp`, `frame_index` | float32, int64 | Episode-relative time and zero-based frame index. |
| `episode_index`, `index` | int64 | Episode index and subset-wide frame index. |
| `task_index` | int64 | Coarse task dictionary index. |
| `task_index_medium` | int64 | Medium annotation index. |
| `task_index_fine`, `subtask_index` | int64 | Fine annotation index; the two columns identify the same fine annotation. |
| `subtask_is_valid` | bool | Whether the frame has a valid fine annotation. |

For the exact feature order, use `info["features"][feature]["names"]`. In the prepared data, the state/action order is left arm joints (7), left gripper (1), right arm joints (7), right gripper (1), torso joints (4), head joints (2), and chassis channels (3). The schema describes 25 values, not the MBDF Canonical55 layout. Stored gripper values are not automatically binarized or normalized by the reader.

Video shapes in `info.json` use `[height, width, channels]`. The official reader returns RGB tensors in `[channels, height, width]`: `(3, 720, 1280)` for the head and `(3, 360, 640)` for each wrist.

### Annotation Tables and Frame-Level Lookup

| Annotation | Table under `meta/chunk_000/` | Index / text columns |
| --- | --- | --- |
| Coarse task | `tasks.parquet` | `task_index` / `task` |
| Medium caption | `medium.parquet` | `medium_index` / `medium` |
| Fine caption | `subtasks.parquet` | `subtask_index` / `subtask` |
| Body-part atomic actions | `atomic_actions.parquet` | Interval lookup by `episode_index`, `body_part`, `start_frame`, `end_frame` |

Medium and fine rows include `episode_index`, inclusive `start_frame`/`end_frame`, and `timestamp_start`/`timestamp_end`. The timestamps describe the equivalent half-open interval: `[start_frame / fps, (end_frame + 1) / fps)`. These are episode-relative times, not offsets into a shared MP4 file.

Atomic rows include `body_part`, `atomic_action`, `caption`, and the same interval fields. `subtask_indices` lists overlapping fine annotations; `subtask_index` provides a single containing fine annotation when that relationship exists. Body-part tracks can overlap and need not form a strict temporal tree. Null action labels remain unspecified.

Text is stored in the dictionaries and interval tables rather than duplicated in `task_medium` and `task_fine` frame columns. The episode tables do not require a duplicate `instruction_segments` payload. Join a frame's indices to the appropriate table; treat a missing index of `-1` as absent rather than as Python's last-row index, and respect `subtask_is_valid` for fine annotations.

These medium, fine, atomic-action, and calibration fields are explicit dataset extensions. Successful loading by the official reader does not mean a training pipeline automatically uses every extension.

### Camera Calibration in Episode Metadata

Each episode row provides rig-specific calibration for the three camera names:

| Field | Representation |
| --- | --- |
| `camera_intrinsics/<camera>` | `[fx, fy, cx, cy]`, already in stored-video pixels. |
| `camera_resolution/<camera>` | `[width, height]`: 1280 × 720 for the head; 640 × 360 for wrists. |
| `camera_model/<camera>` | Pinhole projection model. |
| `camera_distortion/<camera>` | Brown–Conrady coefficients `[k1, k2, p1, p2, k3]`; see `camera_distortion_model/<camera>`. |
| `camera_parent_link/<camera>` | Kinematic link used as the camera's parent. |
| `camera_extrinsics/T_head_cam_high` | Camera optical coordinates → head parent, stored as `T_parent_camera`. |
| `camera_extrinsics/T_left_cam_left_wrist` | Camera optical coordinates → left end-effector parent. |
| `camera_extrinsics/T_right_cam_right_wrist` | Camera optical coordinates → right end-effector parent. |

Each extrinsic is a row-major list of 16 float64 values, reshaped to `(4, 4)`. The transform direction is **`p_parent = T_parent_camera @ p_camera_optical`**; optical axes are x right, y down, z forward, and translation is in metres. Check `calibration/transform_convention` and the declared parent links.

These are fixed camera-mount calibrations relative to the moving parent links. They are **not** the per-frame, base-relative camera-body poses stored in MBDF `camera.pt`. To obtain a base-relative optical pose, compose the parent's forward-kinematic pose at frame `t` with the mount: `T_base_optical[t] = T_base_parent[t] @ T_parent_optical`. MBDF additionally applies its declared optical/body axis conversion. Both formats' intrinsics already match the released image dimensions.

### Statistics for Training

Global statistics live in `meta/stats.json`; episode statistics are in `stats/<feature>/<statistic>` columns in the episode Parquets. State and action statistics include `q01` and `q99` as well as minimum, maximum, mean, standard deviation, and count. RGB streams include channel statistics globally and per episode.

The stored numeric samples are not automatically normalized when read. Choose the normalization policy required by your model and use the matching feature statistics.

### Load with the Official Reader

The prepared release has been sampled with **LeRobot 0.4.4**, including three-camera decoding and PyTorch `DataLoader` batching. Install that version and the PyAV backend:

```bash
pip install "lerobot==0.4.4" av pyarrow
```

After downloading a task subset, point `root` at that subset's directory, **not** at the multi-format repository root:

```python
from pathlib import Path

import torch
from torch.utils.data import DataLoader
from lerobot.datasets.lerobot_dataset import LeRobotDataset

task_root = Path("motubrain_astribot_s1/LeRobot/Pretrain_XC011_hang_electronic_scale")
if not (task_root / "meta/info.json").is_file():
    raise FileNotFoundError(f"Missing local subset metadata: {task_root / 'meta/info.json'}. "
                            "Download the complete task subset and check task_root.")
episode_index = 0
# repo_id identifies this aggregate repository; root must be the downloaded subset.
dataset = LeRobotDataset(
    repo_id="GensPI/Motubrain-Astribot-S1",
    root=task_root,
    episodes=[episode_index],
    video_backend="pyav",
)

sample = dataset[0]
# LeRobot 0.4.4 can resolve -1 to the last dictionary row; never use that text.
subtask_index = int(sample["subtask_index"].item())
subtask_is_valid = bool(sample["subtask_is_valid"].item()) and subtask_index >= 0
subtask = sample["subtask"] if subtask_is_valid else None
print("valid fine annotation:", subtask)

for key in ("observation.state", "action", "observation.eef"):
    assert torch.isfinite(sample[key]).all()
    print(key, tuple(sample[key].shape))

for camera in ("cam_high", "cam_left_wrist", "cam_right_wrist"):
    key = f"observation.images.{camera}"
    print(key, tuple(sample[key].shape))

batch = next(iter(DataLoader(dataset, batch_size=2, num_workers=0)))
print("action batch:", tuple(batch["action"].shape))
print("state quantiles:", dataset.meta.stats["observation.state"]["q01"])
```

See the [official LeRobot v3 documentation](https://huggingface.co/docs/lerobot/en/lerobot-dataset-v3) for the general dataset API. The example above specifies a local subset root because this repository contains multiple formats and multiple task subsets.

If local metadata or episode files are missing, LeRobot 0.4.4 may fall back to Hub downloads. This aggregate repository has no root-level `meta/info.json`, so such a fallback can produce a misleading remote 404. Check the local subset path and finish its scoped download instead. For fine captions, use the guarded `subtask` above: the reader's raw `sample["subtask"]` can contain the last dictionary entry for an invalid `-1` index. Keep `sample` unchanged for default `DataLoader` collation, and use `subtask_is_valid` together with `subtask_index >= 0` to mask fine-caption supervision.

### Read Annotations, Calibration, and the MBDF Mapping

Using `task_root` and `episode_index` from the example above:

```python
import json

import numpy as np
import pyarrow.parquet as pq

info = json.loads((task_root / "meta/info.json").read_text())
episode_rows = [
    row
    for path in sorted((task_root / "meta/episodes").glob("chunk-*/file-*.parquet"))
    for row in pq.read_table(path).to_pylist()
]
episode = next(row for row in episode_rows if row["episode_index"] == episode_index)
data_path = task_root / info["data_path"].format(
    chunk_index=episode["data/chunk_index"],
    file_index=episode["data/file_index"],
)
frames = [row for row in pq.read_table(data_path).to_pylist()
          if row["episode_index"] == episode_index]
frame = frames[0]

annotation_root = task_root / "meta/chunk_000"
for filename, id_column, text_column, frame_column in (
    ("tasks", "task_index", "task", "task_index"),
    ("medium", "medium_index", "medium", "task_index_medium"),
    ("subtasks", "subtask_index", "subtask", "subtask_index"),
):
    rows = pq.read_table(annotation_root / f"{filename}.parquet").to_pylist()
    lookup = {row[id_column]: row for row in rows}
    label_id = frame[frame_column]
    valid = label_id >= 0
    if filename == "subtasks":
        valid = valid and frame["subtask_is_valid"]
    print(filename, lookup[label_id][text_column] if valid else None)

atomic_rows = pq.read_table(annotation_root / "atomic_actions.parquet").to_pylist()
active = [row for row in atomic_rows
          if row["episode_index"] == episode_index
          and row["start_frame"] <= frame["frame_index"] <= row["end_frame"]]
print("atomic actions:", [(row["body_part"], row["atomic_action"], row["caption"])
                          for row in active])

fx, fy, cx, cy = episode["camera_intrinsics/cam_high"]
K = np.array([[fx, 0, cx], [0, fy, cy], [0, 0, 1]], dtype=np.float64)
T_parent_optical = np.asarray(
    episode["camera_extrinsics/T_head_cam_high"], dtype=np.float64
).reshape(4, 4)
print("head intrinsics:", K)
print("parent link:", episode["camera_parent_link/cam_high"])
print("camera to parent:", T_parent_optical)

mbdf_relative_path = Path("MBDF") / episode["ario_task_name"] / episode["ario_episode_name"]
print("MBDF counterpart:", mbdf_relative_path)
print("shared episode ID:", episode["episode_id"])
```

`ario_task_name` and `ario_episode_name` are retained mapping-field names that identify the corresponding **MBDF** directory. `episode_id` is shared across both representations. A merged LeRobot task can map to several original MBDF task directories, so use these fields rather than constructing the mapping from the merged task name.

## Data Collection and Quality Review

Demonstrations are collected on physical Astribot S1 robots and curated through the following stages:

1. **Structural and kinematic filtering.** Check required assets, frame counts, tensor shapes, finite values, degenerate signals, motion discontinuities, and prolonged waiting or static segments.
2. **Task-balanced selection.** Select candidate demonstrations across task categories rather than allowing the largest recording tasks to dominate.
3. **Automated embodied-data quality checks.** Inspect visual quality, temporal consistency, trajectory plausibility, and available camera geometry.
4. **Human visual review.** Review task execution, instruction fidelity, human interference, robot motion, severe occlusion, and image corruption; retain approved episodes through a review whitelist.
5. **Release preparation.** Apply face de-identification, produce English annotations and task identifiers, write rig-specific calibration, and check episode assets and alignment.

Dataset duration is counted once per episode. Additional camera views do not multiply the number of demonstration hours.

## Intended Uses and Scope

MBDF supports world-model learning from synchronized video and robot trajectories, language-conditioned manipulation, hierarchical policy research, and analysis of bimanual coordination. The plain episode structure also supports custom temporal sampling and alternative action representations.

The demonstrations reflect the recorded robot platforms, tasks, and environments. Face de-identification can obscure parts of an image. Captions and atomic-action tracks are temporally grounded annotations, not a guarantee that every downstream training system automatically consumes every annotation level. An unobservable body-part action should remain unspecified.

## License and Citation

This dataset is licensed under [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/).

Citation information will be announced with the data release.

## Contact

For dataset questions, use this repository's **Community** tab. See [Motubrain](https://www.motubrain.com/) for project updates.
