Project P13
A robot that learns by imitation
How does a robot learn a manipulation skill from demonstrations, why do naive methods fail, and what makes modern policies work?
- stages
- 9
- duration
- 15 h 50 min
- concepts
- 21
- available in English
- 9 / 9
- completed by you
0 of 9
Where it fits
Prerequisites
Leads to
This completes the path.
Overview
An imitation learning project in MuJoCo simulation, from demonstrations to a state-of-the-art visuomotor policy. Collect demonstrations using a scripted expert and teleoperation, train behavior cloning with a strict evaluation protocol, correct compounding error with DAgger, move to vision-based policies, study multimodal actions, and implement ACT with action chunks and Diffusion Policy. Measure scaling curves over demonstration count and out-of-distribution generalization, then fine-tune a small vision-language-action model for language-conditioned tasks.
Why it matters
Building robots that learn by imitation is one of your goals and a rapidly advancing path in robotics. This project brings together vision, sequences, generative models (diffusion and CVAEs), transformers, and control. It teaches lessons learned by running policies: compounding error, multimodal demonstrations, and the large gap between training loss and actual success rate.
Stages 9
- 01Simulation, teleoperation and demonstrationsPrepare the tasks: push a T-shaped object to a target pose, the custom arm task from project 9, and simulated bimanual MuJoCo tasks available in LeRobot. Write a scripted expert with simulator-state access, implement keyboard, mouse, or gamepad teleoperation, and store episodes in LeRobot format.
- 02Behavior cloning and rollout evaluationTrain state-based behavior cloning as a baseline and establish the evaluation protocol: success rate over many episodes with new initial states, confidence intervals, and multiple training seeds. Measure drift between visited states and demonstrations and relate it to failures.
- 03DAgger and interactive correctionImplement DAgger using the scripted expert as an oracle: the policy acts, the expert labels visited states, and the data are aggregated. Compare with adding demonstrations at an equal label count and test interactive correction when a human intervenes on policy errors.
- 04Vision-based policiesMove from privileged simulation state to camera images using a pretrained ResNet encoder with spatial softmax, multi-camera fusion with proprioception, and random-crop augmentation. Compare against the state policy and measure inference latency and memory on the RTX 4060.
- 05Action multimodalityWhen several actions are correct in the same state, such as going around an object on the left or right, squared-error regression averages them into an action that does neither. Reproduce the failure in a toy example and in T pushing, and compare Gaussian mixture and discretized action heads.
- 06ACT: action chunking with transformersImplement ACT: a transformer predicts a chunk of future actions from images and proprioception, with a CVAE encoder capturing the style of each demonstration and temporal ensembling during execution. Train in simulated bimanual tasks and T pushing and measure the effect of chunk size.
- 07Diffusion PolicyImplement Diffusion Policy: a 1D temporal U-Net generates action sequences by diffusion conditioned on observations through FiLM, trained with the diffusion project recipe and sampled with DDIM in a few steps. Execute with a receding horizon and compare with behavior cloning, Gaussian mixture, and ACT on T pushing.
- 08Data scaling and generalizationMeasure what matters for deployment: how many demonstrations are needed and what happens outside the training distribution. Plot success against the number and diversity of demonstrations for each policy, and evaluate unseen positions, objects, lighting, and perturbations using simulator domain randomization.
- 09A small vision-language-action modelFinish at the frontier with policies receiving a natural-language instruction. Fine-tune a small open-weight VLA designed for consumer GPUs on simulated language-conditioned tasks within an 8 GB budget, and evaluate by instruction, held-out paraphrases, and unseen compositions against Diffusion Policy conditioned on an instruction embedding.
Final deliverable
A simulated robot that learns from demonstrations
A complete system for collecting demonstrations, training Diffusion Policy and ACT, and evaluating data scaling curves and out-of-distribution performance on your own arm. As an optional extension outside the project budget, the same pipeline can be transferred to a low-cost physical arm compatible with LeRobot.
Check what you already know
- Collect and store manipulation demonstrations with reproducible observations, actions, and metadata
- Evaluate a policy's success rate using enough episodes and confidence intervals
- Explain compounding error in behavior cloning and correct it with DAgger
- Show why squared-error regression averages action modes and propose alternatives
- Implement action chunks with temporal ensembling as in ACT
- Implement Diffusion Policy with a receding horizon