Dataset Viewer
Duplicate
The dataset viewer is not available for this split.
Job has been terminated due to a temporary spike in resource usage and may be restarted later.
Error code:   JobManagerCrashedError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

UR5e GELLO Peg-in-Hole Dataset

Overview

This dataset contains human demonstrations of a peg-in-hole insertion task, collected by teleoperating a UR5e robotic arm using the GELLO teleoperation system.

The dataset is intended for imitation learning research using the Robomimic framework.

  • Robot: Universal Robots UR5e
  • Teleoperation System: GELLO
  • Task: Peg-in-hole insertion (robotic assembly)
  • Data Format: HDF5 (.hdf5)
  • Project Repository: UR5e-Teleoperation-GELLO (Private; access upon request)

Dataset Structure

The dataset contains multiple demonstration trajectories organized in HDF5 format.

data/
β”œβ”€β”€ demo_0/
β”‚   β”œβ”€β”€ obs/
β”‚   β”‚   β”œβ”€β”€ <camera>_image    # Camera images
β”‚   β”‚   β”œβ”€β”€ tcp_pos           # End-effector position
β”‚   β”‚   β”œβ”€β”€ tcp_quat          # End-effector orientation
β”‚   β”‚   β”œβ”€β”€ gripper_position  # Gripper position
β”‚   β”‚   β”œβ”€β”€ joints            # Robot joint states
β”‚   β”‚   └── wrench            # Force/torque measurements
β”‚   β”œβ”€β”€ actions               # Recorded robot actions
β”‚   β”œβ”€β”€ rewards               # Rewards (if available)
β”‚   └── dones                 # Termination flags (if available)
β”œβ”€β”€ demo_1/
└── ...

Each demonstration contains time-indexed robot observations and actions. Observation fields may vary depending on the recorded data.

Dataset Visualization

The following Python code provides an interactive visualization of recorded demonstrations, including camera images, robot states, and actions.

Install dependencies:

pip install h5py numpy matplotlib

Visualization Code:

import argparse
import h5py
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider


def get_array(group, key, t):
    return np.array(group[key][t]) if key in group else None


def fmt(x, precision=3):
    if x is None:
        return "N/A"
    return np.array2string(np.asarray(x).reshape(-1), precision=precision, suppress_small=True)


parser = argparse.ArgumentParser()
parser.add_argument("--dataset", required=True)
parser.add_argument("--demo", default=None)
args = parser.parse_args()

f = h5py.File(args.dataset, "r")
demos = sorted(f["data"].keys(), key=lambda x: int(x.split("_")[-1]) if "_" in x else x)

demo = args.demo if args.demo is not None else demos[0]
grp = f["data"][demo]
obs = grp["obs"]
T = grp["actions"].shape[0]

print(f"Dataset: {args.dataset}")
print(f"Demo: {demo}")
print(f"Transitions: {T}")
print("Obs keys:", list(obs.keys()))

img_keys = [k for k in obs.keys() if "image" in k]
print("Image keys:", img_keys)

if not img_keys:
    raise RuntimeError("No image keys found in obs/")

fig = plt.figure(figsize=(12, 7))
ax1 = plt.subplot2grid((3, 2), (0, 0), rowspan=2)
ax2 = plt.subplot2grid((3, 2), (0, 1), rowspan=2)
txt_ax = plt.subplot2grid((3, 2), (2, 0), colspan=2)
txt_ax.axis("off")

img1 = obs[img_keys[0]][0]
img2 = obs[img_keys[1]][0] if len(img_keys) > 1 else np.zeros_like(img1)

im1 = ax1.imshow(img1)
ax1.set_title(img_keys[0])
ax1.axis("off")

im2 = ax2.imshow(img2)
ax2.set_title(img_keys[1] if len(img_keys) > 1 else "No second image")
ax2.axis("off")

plt.subplots_adjust(bottom=0.18)

slider_ax = plt.axes([0.15, 0.06, 0.7, 0.03])
slider = Slider(slider_ax, "Frame", 0, T - 1, valinit=0, valstep=1)


def update(frame):
    t = int(frame)
    im1.set_data(obs[img_keys[0]][t])

    if len(img_keys) > 1:
        im2.set_data(obs[img_keys[1]][t])

    eef_pos = get_array(obs, "tcp_pos", t)
    eef_quat = get_array(obs, "tcp_quat", t)
    gripper = get_array(obs, "gripper_position", t)
    joints = get_array(obs, "joints", t)
    wrench = get_array(obs, "wrench", t)
    action = get_array(grp, "actions", t)
    reward = get_array(grp, "rewards", t)
    done = get_array(grp, "dones", t)

    text = (
        f"Demo: {demo} | Frame: {t}/{T-1}\n"
        f"EEF pos:   {fmt(eef_pos)}\n"
        f"EEF quat:  {fmt(eef_quat)}\n"
        f"Joints:    {fmt(joints)}\n"
        f"Gripper:   {fmt(gripper)}\n"
        f"Wrench:    {fmt(wrench)}\n"
        f"Action:    {fmt(action)}\n"
        f"Reward:    {fmt(reward)} | Done: {fmt(done)}"
    )

    txt_ax.clear()
    txt_ax.axis("off")
    txt_ax.text(0.01, 0.95, text, va="top", family="monospace", fontsize=10)
    fig.canvas.draw_idle()


slider.on_changed(update)
update(0)
plt.show()
f.close()

Usage:

To visualize a specific demonstration:

python visualize_hdf5.py --dataset dataset.hdf5 --demo demo_0

The viewer displays up to two camera streams, robot states, actions, rewards, and termination flags with an interactive frame slider.

Downloads last month
80

Space using ns69956/UR5e-PegInsertion 1