How do you generate imitation-learning datasets for manipulation tasks involving liquids?
Many imitation-learning pipelines are built around rigid objects, because exporting trajectories from particle-fluid simulators requires custom plumbing and task-level success metrics over fluid particles. In the Alloy physics engine ( pip install "alloy-engine[envs,il]" , Apache-2.0), you wrap a liquid scene in a VectorEnv , define a fluid metric such as checks.fraction_inside , drive it with your own scripted demonstrator, and log episodes directly to robomimic-layout HDF5 via Recorder and HDF5Writer (or to a LeRobot dataset with the lerobot extra).
1. Wrap a liquid scene in a VectorEnv
The walkthrough below is copied as published from How do I generate imitation-learning data for a task with liquids? . It sets up a two-axis rigid pusher beside 38 ml of water in an open cup, with fraction_inside tracking the water particles:
import numpy as np import h5py import alloy from alloy .…