cluttered_grasp / README.md
benudavis's picture
Update README.md
10df2ce verified
|
Raw
History Blame Contribute Delete
5.94 kB
metadata
license: apache-2.0
task_categories:
  - robotics
tags:
  - LeRobot
  - ur10
  - robotiq
  - tactile
  - depth
  - cluttered-grasping
  - imitation-learning
configs:
  - config_name: default
    data_files: data/*/*.parquet

Cluttered Grasp (UR10 + Robotiq 2F-140 + tactile + depth)

Real-robot teleop demonstrations of cluttered grasping. Episodes are gated on gripper_tcp height in base_link (record while low, pause while high), time-synced to the RealSense RGB master @ 30 Hz, then converted to LeRobot format.

Robot UR10 + Robotiq 2F-140 (ur10_robotiq_2f140)
FPS 30 (RGB master timeline)
Episodes 103
Frames 23943
Codebase LeRobot dataset v3.0
Task cluttered grasping

Sensors & resolutions

Stream Capture (ROS) Dataset feature Shape (H×W×C) Aspect
Center RGB RealSense color 1280×720@30 JPEG observation.images.center_cam 720×1280×3 16:9
Depth Depth module 848×480@30, published as aligned_depth_to_color → resampled into the color grid observation.images.center_cam_depth 720×1280×1 (uint16 mm, video12) 16:9 (aligned)
Tactile L Fingertip cam JPEG (~90 Hz capture, hold-last to RGB) observation.images.tactile_L 240×320×3 4:3
Tactile R same observation.images.tactile_R 240×320×3 4:3
  • Master clock: compressed RGB frames — one dataset row per RGB stamp (~30 Hz).
  • Sync: nearest-neighbor within ~50 ms, then hold-last for depth/tactile/proprio.
  • Depth note: the D4xx depth module runs at 480p (848×480). Hardware align-to-color writes depth in RGB resolution, so the stored/LeRobot depth video is 1280×720 (same pixels as center_cam), unit millimetres.
  • Depth export modes used for this release: 12-bit gray12le HEVC (video12), log-quantized over 0.2–1.0 m.

Dataset structure

cluttered_grasping/
├── meta/
│   ├── info.json          # schema, fps, totals, video codec info
│   ├── stats.json         # per-feature normalization stats
│   ├── tasks.parquet      # task prompts
│   └── episodes/          # per-episode metadata
├── data/
│   └── chunk-*/file-*.parquet   # state, action, indices
└── videos/
    ├── observation.images.center_cam/chunk-*/file-*.mp4        # AV1, 1280×720
    ├── observation.images.center_cam_depth/chunk-*/file-*.mp4  # HEVC gray12le depth
    ├── observation.images.tactile_L/chunk-*/file-*.mp4         # AV1, 320×240
    └── observation.images.tactile_R/chunk-*/file-*.mp4

Features (per frame)

Key Type Shape Description
observation.state float32 (14,) joint_0..5, gripper, eef_x/y/z, eef_qx/qy/qz/qw (xyzw)
action float32 (7,) Absolute next joint_0..5 + gripper (last frame of each episode dropped)
grasp_state int64 (1,) Exclusive grasp phase at observation t: 0 no_contact, 1 contact, 2 closure, 3 lift, 4 success
next.success float32 (1,) 1.0 on the frame before a transition into success (labels[t]≠4 and labels[t+1]==4); else 0
next.done float32 (1,) Same pulse as next.success (task/terminal success co-located with that transition)
observation.images.center_cam video (AV1) 720×1280×3 Scene RealSense RGB
observation.images.center_cam_depth video (HEVC gray12le) 720×1280×1 Aligned depth, mm; is_depth_map
observation.images.tactile_L video (AV1) 240×320×3 Left fingertip tactile (/tactile1)
observation.images.tactile_R video (AV1) 240×320×3 Right fingertip tactile (/tactile2)
timestamp float32 (1,) Time within episode (s)
frame_index / episode_index / index / task_index int64 (1,) LeRobot indices

observation.state EE pose is gripper_tcp in base_link. Wrist force/torque is not exported to LeRobot (still present in upstream zarr if needed).

Label example: if phase history is …, contact, contact, success, success, …, then only the last contact frame has next.success = next.done = 1.0.

Episode definition

  • Start when TCP (z < 0.32) m
  • End when TCP (z > 0.33) m
  • No recording between episodes (reset / high)

Load

from lerobot.datasets.lerobot_dataset import LeRobotDataset

ds = LeRobotDataset("benudavis/cluttered_grasp")
print(ds)
frame = ds[0]
# RGB / tactile: frame["observation.images.center_cam"], ...
# Depth (mm-quantized video12): frame["observation.images.center_cam_depth"]
# Phases / returns:
#   frame["grasp_state"]      # int64 phase id
#   frame["next.success"]     # 1.0 before successful grasp onset
#   frame["next.done"]        # same as next.success

Collection / conversion notes

  • ROS bags → one zarr episode per bag (bag2dataset under ~/venvs/clutter, zarr≥3).
  • Offline rebuild: scripts/zarr_to_lerobot.py --fps 30 --depth-mode video12 over ~/EDG_Experiment/clutter/**/*.zarr.
  • Phase labels: scripts/label_grasp_states.py (Streamlit) writes data/obs/policy/grasp_state and, on Save / Save all, derived next_success / next_done on each episode zarr.
  • Converter recomputes next.success / next.done from grasp_state and trims leading NaN policy frames (delayed joint/TF after record start).
  • Auto-label may set contact/success from tactile blob area; only terminal success runs (touching episode end) stay success.
  • Action mode default: absolute_next (see scripts/lerobot_convert/actions.py).
  • Upload: scripts/upload_lerobot_hf.py (copies this card to the dataset root as README.md).