Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Job manager crashed while running this job (missing heartbeats).
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.

image
image
End of preview.

Robot ManiSkill Image–State Dataset

0. Update

12.2

delete pick_cube_rgb_traj_v1

11.30

pick_cube_rgb_traj_v2: rendering images with cube in pickcube task.

11.28

pick_cube_rgb_traj_v1: Trajectory subset

pick_cube_rgb_random_v1: Random joint sampling subset

1. Overview

This dataset is generated in the ManiSkill simulation environment.
It contains two types of data pairs:

  1. Random joint sampling subset

    • Randomly sampled robot joint configurations (qpos).
    • For each sampled configuration, multi-view RGBD images are rendered.
  2. Trajectory subset

    • Full trajectories from ManiSkill's demonstrations (.h5).
    • For each time step, one-view RGBD images are rendered.

2. Dataset Structure

On the Hub, the dataset is organized as follows:

surgingTu/robot-maniskill-image-state-dataset-v1
β”œβ”€β”€ pickcube_rgb_traj_v1/
β”‚   └── PickCube-v1/
β”‚       β”œβ”€β”€ traj_0/
β”‚       β”œβ”€β”€ traj_1/
β”‚       β”œβ”€β”€ ...
β”‚       └── traj_K/
└── pickcube_rgb_random_v1/
    └── random_robot_rendering/
        β”œβ”€β”€ sample_0000/
        β”œβ”€β”€ sample_0001/
        β”œβ”€β”€ ...
        └── sample_NNNN/

2.1 Trajectory subset

Each trajectory directory (e.g. traj_0) has the structure:

pickcube_rgb_traj_v1/PickCube-v1/traj_0/
  β”œβ”€β”€ images/
  β”‚     β”œβ”€β”€ {CAM_NAME}_step0000.png
  |     β”œβ”€β”€ {CAM_NAME}_step0000_depth.npy
  β”‚     β”œβ”€β”€ {CAM_NAME}_step0001.png
  |     β”œβ”€β”€ {CAM_NAME}_step0001_depth.npy
  β”‚     β”œβ”€β”€ ...
  β”‚     β”œβ”€β”€ {CAM_NAME}_step{T-1:04d}.png
  β”‚     └── {CAM_NAME}_step{T-1:04d}_depth.npy
  └── actions.npy          # shape (T, A), low-level actions per time step
  β”œβ”€β”€ qpos.npy    # shape (T, D_qpos), joint positions per time step
  β”œβ”€β”€ camera_params.json
  β”œβ”€β”€ ...

CAM_NAME encodes the camera configuration (e.g. y_angle_0_z_angle_0). *_stepXXXX.png is the image at time step XXXX.

All cameras share the same step index.

2.2 Random joint sampling subset

Each random sample directory (e.g. sample_0000) has the structure:

pickcube_rgb_random_v1/random_robot_rendering/sample_0000/
  β”œβ”€β”€ images/
  β”‚     β”œβ”€β”€ {CAM_NAME}_sample0000.png
  |     β”œβ”€β”€ {CAM_NAME}_sample0000_depth.npy
  β”‚     β”œβ”€β”€ {CAM_NAME}_sample0001.png
  |     β”œβ”€β”€ {CAM_NAME}_sample0001_depth.npy
  β”‚     β”œβ”€β”€ ...
  β”‚     β”œβ”€β”€ {CAM_NAME}_sample{M-1:04d}.png
  β”‚     └── {CAM_NAME}_sample{M-1:04d}_depth.npy
  └── qpos.npy             # shape (M, D_qpos), random joint configurations
  β”œβ”€β”€ camera_params.json
  β”œβ”€β”€ ...

For this subset, filenames use *_sampleXXXX.png instead of *_stepXXXX.png.

3. Reference dataloader function

Below is a minimal reference function for loading one directory (either a single traj_* or sample_* folder). It parses multi-view images and the corresponding actions.npy (or can be adapted to qpos.npy).

import numpy as np
import imageio.v2 as imageio

def load_obs_qpos_pair_from_dir(path):
    """
    Load multi-view RGB observations and corresponding actions from a directory.

    e.g. path = ~/mani_datasets/pickcube_rgb_traj_v1/PickCube-v1/traj_0
         or path = ~/mani_datasets/pickcube_rgb_random_v1/random_robot_rendering/sample_0000

    Expected directory structure:
        path/
          β”œβ”€β”€ images/
          β”‚     β”œβ”€β”€ {CAM_NAME}_step0000.png
          β”‚     β”œβ”€β”€ {CAM_NAME}_step0001.png
          β”‚     └── ...
          └── actions.npy

    tips: change "step" to "sample" if the dataset is from random robot rendering.

    - Images follow the pattern: "{cam_name}_step{STEP:04d}.png"
      e.g. "y_angle_0_z_angle_0_step0065.png".

    Returns:
        image_dict: dict[step_idx][cam_name] -> (H, W, 3) image array
        actions: np.ndarray of shape (T, A)   or other .npy file  (e.g. qpos.npy)
    """
    from pathlib import Path
    
    print("Loading obs and qpos pair from directory", path)
    path = Path(path)

    # image
    images_dir = path / "images"
    image_dict = {}
    image_png_dict = {}
    for p in sorted(images_dir.glob("*.png")):
        name = p.stem
        if "_step" not in name:
            continue
        # ζŒ‰ζœ€εŽδΈ€δΈͺ "_step" εˆ‡εΌ€
        cam_name, step_str = name.rsplit("_step", 1)  # cam_name = y_angle_0_z_angle_0, step_str = 0065
        step_idx = int(step_str)   # step0000 -> 0, step0065 -> 65
        if step_idx not in image_dict:
            image_dict[step_idx] = {}
        # ζŒ‰ step εˆ†η»„οΌŒε†ζŒ‰ camera name ε­˜θ·―εΎ„
        image_dict[step_idx][cam_name] = str(p)
    
    for step_idx in image_dict:
        if step_idx not in image_png_dict:
            image_png_dict[step_idx] = {}
        for cam_name in image_dict[step_idx]:
            if cam_name not in image_png_dict[step_idx]:
                image_png_dict[step_idx][cam_name] = {}
            image_path_tmp = image_dict[step_idx][cam_name]
            if image_path_tmp.endswith('.png'):
                image_png_dict[step_idx][cam_name] = imageio.imread(image_path_tmp)

    # actions
    action_files = list(path.glob("actions.npy"))
    action = np.load(action_files[0])
    print("action shape")
    print(action.shape)

    if len(image_png_dict) != action.shape[0]:
        raise ValueError(f"image_png_dict length: {len(image_png_dict)} != action length: {action.shape[0]}")

    # qpos
    # qpos_files = list(path.glob("qpos.npy"))
    # qpos = np.load(qpos_files[0])
    # print(qpos.shape)

    # if len(image_png_dict) != qpos.shape[0]:
    #     raise ValueError(f"image_png_dict length: {len(image_png_dict)} != qpos length: {qpos.shape[0]}")

    return image_png_dict, action
Downloads last month
7,101