wangdx25's picture
Add TsFile (converted from jellyho/droid_subsets_scooping)
79d05ef verified
|
Raw History Blame Contribute Delete
8.69 kB
---
license: apache-2.0
task_categories:
- robotics
tags:
- tsfile
- timeseries
- time-series
- LeRobot
- DROID
- robotics
- skill-filtered
- scooping
- format:tsfile
pretty_name: droid_subsets_scooping (TsFile)
configs:
- config_name: default
data_files:
- split: train
path: data/droid_subsets_scooping.tsfile
---
# droid_subsets_scooping (TsFile)
Apache TsFile version of [`jellyho/droid_subsets_scooping`](https://huggingface.co/datasets/jellyho/droid_subsets_scooping).
## Overview
A LeRobot `v3.0` manipulation dataset recorded with a `Franka` robot arm, converted to a single Apache TsFile table.
- **Scale:** 300 episodes / 147,394 frames at 15 fps (~164 min of robot time) / 300 task(s).
- **Task language:** `Move the black pot to the right then use the spoon to take some contents out of the pot`; `Scoop up the beans from the bowl on the right and put them to the bowl on the left`; `Use the silver spoon to get some coffee beans from the container and put them on the small white plate.`; `Use the spoon to scoop some of the contents in the white bowl into the glass on the right`; `Use the silver spoon to scoop some of the contents in the bowl into the glass cup`; `Use the spoon to transfer beans to the bowl on the left`; `Use the spoon to scoop some beans from the red bowl and put them in the pot`; `Use the spoon to move some of the brown objects to the other bowl` …
- **Tables:** 1 TsFile table(s), 147,394 rows in total.
- `droid_subsets_scooping`: 147,394 rows, Time restarts inside every episode.
## Schema (TsFile structure)
### `droid_subsets_scooping.tsfile`
- **Time** (INT64, milliseconds) — `round(timestamp × 1000)`; the source `timestamp` column is folded into Time.
- **TAG**: `episode_index`, `task_index` — device dimension; query one device with `WHERE episode_index=...`.
- **FIELD** (98): `frame_index` (int64), `sample_index` (int64), `is_first` (int64), `is_last` (int64), `is_terminal` (int64), `language_instruction` (string), `language_instruction_2` (string), `language_instruction_3` (string), `observation_state_gripper_position` (float), `action_gripper_position` (float), `action_gripper_velocity` (float), `discount` (float), `reward` (float), `task_category` (string), `building` (string), `collector_id` (string), `date` (string), `is_episode_successful` (int64), `observation_state_cartesian_position_0` (float), `observation_state_cartesian_position_1` (float), `observation_state_cartesian_position_2` (float), `observation_state_cartesian_position_3` (float), `observation_state_cartesian_position_4` (float), `observation_state_cartesian_position_5` (float), `observation_state_joint_position_0` (float), `observation_state_joint_position_1` (float), `observation_state_joint_position_2` (float), `observation_state_joint_position_3` (float), `observation_state_joint_position_4` (float), `observation_state_joint_position_5` (float), `observation_state_joint_position_6` (float), `observation_state_0` (float), `observation_state_1` (float), `observation_state_2` (float), `observation_state_3` (float), `observation_state_4` (float), `observation_state_5` (float), `observation_state_6` (float), `observation_state_7` (float), `action_cartesian_position_0` (float), `action_cartesian_position_1` (float), `action_cartesian_position_2` (float), `action_cartesian_position_3` (float), `action_cartesian_position_4` (float), `action_cartesian_position_5` (float), `action_cartesian_velocity_0` (float), `action_cartesian_velocity_1` (float), `action_cartesian_velocity_2` (float), `action_cartesian_velocity_3` (float), `action_cartesian_velocity_4` (float), `action_cartesian_velocity_5` (float), `action_joint_position_0` (float), `action_joint_position_1` (float), `action_joint_position_2` (float), `action_joint_position_3` (float), `action_joint_position_4` (float), `action_joint_position_5` (float), `action_joint_position_6` (float), `action_joint_velocity_0` (float), `action_joint_velocity_1` (float), `action_joint_velocity_2` (float), `action_joint_velocity_3` (float), `action_joint_velocity_4` (float), `action_joint_velocity_5` (float), `action_joint_velocity_6` (float), `action_original_0` (float), `action_original_1` (float), `action_original_2` (float), `action_original_3` (float), `action_original_4` (float), `action_original_5` (float), `action_original_6` (float), `action_0` (float), `action_1` (float), `action_2` (float), `action_3` (float), `action_4` (float), `action_5` (float), `action_6` (float), `action_7` (float), `camera_extrinsics_wrist_left_0` (float), `camera_extrinsics_wrist_left_1` (float), `camera_extrinsics_wrist_left_2` (float), `camera_extrinsics_wrist_left_3` (float), `camera_extrinsics_wrist_left_4` (float), `camera_extrinsics_wrist_left_5` (float), `camera_extrinsics_exterior_1_left_0` (float), `camera_extrinsics_exterior_1_left_1` (float), `camera_extrinsics_exterior_1_left_2` (float), `camera_extrinsics_exterior_1_left_3` (float), `camera_extrinsics_exterior_1_left_4` (float), `camera_extrinsics_exterior_1_left_5` (float), `camera_extrinsics_exterior_2_left_0` (float), `camera_extrinsics_exterior_2_left_1` (float), `camera_extrinsics_exterior_2_left_2` (float), `camera_extrinsics_exterior_2_left_3` (float), `camera_extrinsics_exterior_2_left_4` (float), `camera_extrinsics_exterior_2_left_5` (float)
## Conversion notes
- LeRobot `v3.0` robot dataset converted with the project's generic `lerobot` converter: all episodes of the source `train` split share one TsFile, with the source columns `episode_index` and `task_index` as TAG columns (the TsFile device dimension). Query a single episode with `WHERE episode_index=0`.
- Vector columns preserve the full source column name when flattened: `.` becomes `_` and the element index is appended, so `observation.state` becomes `observation_state_0..N-1` and `action` becomes `action_0..N-1`, all single-precision FLOAT. `frame_index` is kept and the source `index` column is kept as `sample_index`.
- Time = `round(timestamp * 1000)` ms and restarts inside each episode. The source `timestamp` column is not stored separately because it equals `Time / 1000` seconds.
- Camera video streams are NOT included in this repository; see the original dataset for them: https://huggingface.co/datasets/jellyho/droid_subsets_scooping/tree/main/videos
- `meta/` is mirrored from the source with `meta/info.json` updated to describe the converted TsFile artifact. No numeric time-series row is dropped.
- The source is a merged DROID skill subset with 300 distinct language tasks; the language instructions stay in `meta/tasks.parquet` and are referenced by `task_index`, which is a TAG here.
## Usage
> **Read this dataset with the Java SDK.** It is written with the `zstd` compressor. The Apache TsFile Java SDK reads every compressor, but the Python SDK (`pip install tsfile`) implements only `UNCOMPRESSED`, `SNAPPY`, `GZIP` and `LZ4`; opening this file with it yields no rows.
Read a converted file with the Apache TsFile Java SDK (`org.apache.tsfile:tsfile`):
```java
import org.apache.tsfile.file.metadata.IDeviceID;
import org.apache.tsfile.read.TsFileReader;
import org.apache.tsfile.read.TsFileSequenceReader;
import org.apache.tsfile.read.common.Path;
import org.apache.tsfile.read.expression.QueryExpression;
import org.apache.tsfile.read.query.dataset.QueryDataSet;
import org.apache.tsfile.write.schema.MeasurementSchema;
import java.util.ArrayList;
import java.util.List;
String path = "data/droid_subsets_scooping.tsfile";
try (TsFileSequenceReader sequenceReader = new TsFileSequenceReader(path);
TsFileReader reader = new TsFileReader(sequenceReader)) {
// Devices are enumerated as IDeviceID objects. Tables with TAG columns
// have multi-segment device ids that cannot be rebuilt from their string
// form, so always use getAllDevices() rather than getAllDeviceIds().
for (IDeviceID device : sequenceReader.getAllDevices()) {
List<Path> paths = new ArrayList<>();
for (MeasurementSchema schema : reader.getMeasurement(device)) {
String name = schema.getMeasurementName();
if (name != null && !name.isEmpty() && !name.equalsIgnoreCase("Time")) {
paths.add(new Path(device, name, true));
}
}
QueryDataSet dataSet = reader.query(QueryExpression.create(paths, null));
while (dataSet.hasNext()) {
System.out.println(dataSet.next());
}
}
}
```
## Source & license
- Original dataset: [`jellyho/droid_subsets_scooping`](https://huggingface.co/datasets/jellyho/droid_subsets_scooping)
- License: apache-2.0 (as declared by the original dataset).