--- license: mit task_categories: - robotics tags: - robotics - lerobot - robosuite - mimicgen - smolvla --- # Robosuite MimicGen 100 — State-Matched Recorded Dataset This dataset contains 300 episodes (100 per task) of scripted expert demonstrations for three robosuite manipulation tasks, recorded by **replaying mimicgen HDF5 demos in a matched simulation environment**. ## Tasks | Task | Episodes | Frames | Episode Length | Success Rate | |------|----------|--------|---------------|-------------| | Coffee | 100 | 22,225 | 210–249 (mean 222) | 100/100 | | Square_D0 | 100 | 15,328 | 135–172 (mean 153) | 100/100 | | Stack | 99 | 10,912 | 82–131 (mean 110) | 96/100 | | **Total** | **299** | **48,465** | | **296/300** | *Note: 1 Stack episode has 0 frames (recording edge case), and 4 Stack demos failed in the original HDF5.* ## Features | Key | Shape | Type | Description | |-----|-------|------|-------------| | `observation.images.image` | (3, 256, 256) | video | Agentview camera | | `observation.images.wrist_image` | (3, 256, 256) | video | Robot wrist (eye-in-hand) camera | | `observation.state` | (8,) | float32 | `[x, y, z, axisangle_x, axisangle_y, axisangle_z, gripper_q1, gripper_q2]` | | `action` | (7,) | float32 | `[x, y, z, axisangle_x, axisangle_y, axisangle_z, gripper]` (OSC_POSE controller, range [-1, 1]) | - **FPS:** 20 - **Robot:** Panda - **Controller:** OSC_POSE (Operational Space Control, 6-DOF pose + gripper) - **Camera resolution:** 256×256 - **Format:** LeRobot v3.0 (video-encoded with SVT-AV1) ## How This Dataset Was Created ### Source Data The original demonstrations come from the **mimicgen** project's core HDF5 datasets, hosted on HuggingFace: - **Repository:** [`amandlek/mimicgen_datasets`](https://huggingface.co/datasets/amandlek/mimicgen_datasets) - **Files used:** `core/coffee_d0.hdf5`, `core/square_d0.hdf5`, `core/stack_d0.hdf5` - Each HDF5 contains 100 scripted expert episodes with `states`, `actions`, `obs`, `rewards`, and `dones`. ### Why Not Use Existing LeRobot Datasets? Existing lerobot-format robosuite datasets (e.g., `locht131/mimicgen_100_lerobot`) were created by **replaying a trained BC policy** in the environment — not by copying the raw HDF5 scripted actions. This means: 1. **Actions differ significantly** from the ground-truth scripted demos (different magnitudes, sometimes negative correlations) 2. The BC policy may have used a **different env configuration** (controller, camera, robosuite version) 3. Training on these datasets and evaluating in a different env configuration leads to **0% success rate** even after overfitting ### Conversion Process We recorded a fresh dataset by **replaying the exact HDF5 scripted actions in our evaluation environment**, using matching initial states: 1. **Download** the mimicgen core HDF5 files from `amandlek/mimicgen_datasets` 2. For each demo episode: - Create a robosuite env with our exact eval configuration: ```python robosuite.make( env_name=task, # e.g. "Coffee" robots="Panda", has_offscreen_renderer=True, use_camera_obs=True, use_object_obs=False, camera_names=["agentview", "robot0_eye_in_hand"], camera_heights=256, camera_widths=256, control_freq=20, controller_configs=robosuite.load_controller_config(default_controller="OSC_POSE"), ) ``` - Reset the env, then **set the Mujoco simulation state** to match the HDF5 demo's initial state: ```python sim = env.sim state_obj = sim.get_state() state_obj.qpos[:] = hdf5_states[0, :sim.model.nq] state_obj.qvel[:] = hdf5_states[0, sim.model.nq:sim.model.nq+sim.model.nv] sim.set_state(state_obj) sim.forward() ``` - Step through the demo's actions, recording `(observation.state, action, images)` at each timestep 3. Save as lerobot v3.0 dataset using `LeRobotDataset.create()` with video encoding **Key insight:** Setting `sim.set_state()` from the HDF5 ensures the scripted actions produce the intended trajectories. Without this, env randomization means the actions are essentially random from the env's perspective. ### Conversion Script The recorder is at `scripts/record_from_hdf5.py` in the [active_learning_vlas](https://github.com/utiasDSL/active_learning_vlas) repo (`robosuite` branch). To reproduce: ```bash python scripts/record_from_hdf5.py \ --tasks Coffee Square_D0 Stack \ --episodes_per_task 100 \ --output_dir data/mimicgen_100_recorded ``` Requires: `robosuite`, `mimicgen`, `lerobot`, GPU with EGL support for rendering. ## Usage with LeRobot ```python from lerobot.datasets.lerobot_dataset import LeRobotDataset dataset = LeRobotDataset("dlsmarta/robosuite_mimicgen_100") print(f"Episodes: {dataset.num_episodes}, Frames: {dataset.num_frames}") ``` Or in a training config: ```yaml dataset: repo_id: dlsmarta/robosuite_mimicgen_100 video_backend: pyav ``` ## Citation If you use this dataset, please also cite the original mimicgen datasets: ```bibtex @inproceedings{mimicgen2023, title={MimicGen: A Data Generation System for Scalable Robot Learning using Human Demonstrations}, author={Mandlekar, Ajay and Nasiriany, Soroush and Wen, Bowen and Akinola, Iide and Kannan, Animesh and Sheridan, Jackson and Azara, Andrew and Stone, Travis and Fan, Tse and Shridhar, Mohit and others}, booktitle={7th Annual Conference on Robot Learning}, year={2023} } ```