Open Source Robotics

A curated collection of high-quality open source robotics projects, tools, and software to propel the robotics community forward.

DAgger

  • Also called: Dataset Aggregation
  • Category: Learning & autonomy › Learning from demonstration
  • Tags: imitation-learning, policy-distillation, covariate-shift, robot-learning, sim-to-real

An imitation learning algorithm that repeatedly runs the learner's own policy, has an expert label the states it reaches, and retrains on the growing dataset to avoid compounding errors.

Definition

DAgger, short for Dataset Aggregation, is an imitation learning algorithm introduced by Stéphane Ross, Geoffrey Gordon and J. Andrew Bagnell in 2011. It addresses the main weakness of plain behavior cloning. A policy trained only on expert demonstrations sees states the expert visited; once deployed, small mistakes take it to states the expert never visited, where it has no training data and tends to make larger mistakes. This mismatch between training and deployment states is known as covariate shift, and the resulting errors compound over the length of a task.

DAgger fixes the mismatch by collecting data on the learner's own state distribution. The loop is simple: train an initial policy on expert data; run that policy, or a mixture of it and the expert, to visit new states; ask the expert what action it would have taken in each visited state; add these labelled states to the dataset; retrain on the whole aggregated dataset; and repeat. The original paper casts this as a no-regret online learning problem and shows that the policy's error grows roughly linearly with task length rather than quadratically, as it can for behavior cloning.

The practical requirement is an expert that can be queried at arbitrary states. That is easy when the expert is a planner, a scripted controller or a policy in simulation, and harder when it is a person, who must label states they did not choose. Variants such as HG-DAgger let a human take over only when the learner goes wrong. In current robot learning, DAgger is the standard way to distil a privileged teacher policy, trained with reinforcement learning on true simulator state, into a student policy that uses only onboard sensors such as cameras.

Why it matters

Most learned robot policies are trained from demonstrations or from a stronger teacher, and the gap between the states seen in training and the states reached on deployment is a leading cause of failure. DAgger is the simplest well-understood method for closing that gap, and it underlies many teacher–student pipelines used to bring simulation-trained skills to real robots.

Key applications

  • Distilling privileged simulation policies into vision-based student policies
  • Training legged locomotion and parkour controllers for sim-to-real transfer
  • Learning driving and drone navigation policies from planners or human experts
  • Interactive imitation learning where a human corrects the robot during execution
  • Compressing several specialist skill policies into one generalist policy

In practice

A team training a quadruped to climb and jump over obstacles first trains several specialist policies with reinforcement learning in simulation, each with access to exact terrain heights. They then train a single vision-based policy that sees only a depth camera and proprioception. In each round the vision policy drives the simulated robot; at every step the relevant specialist is queried for the action it would take, and the pair of observation and specialist action is stored. The vision policy is retrained on all data collected so far, and the cycle repeats until it matches the specialists closely enough. Because the student generated the states, its training data includes the stumbles and odd camera views it will meet on the real robot.

Common misconceptions

  • DAgger is behavior cloning with more data — the key difference is that new data comes from states the learner itself visits, not from more expert demonstrations
  • DAgger needs a human expert — any expert that can label arbitrary states works, and in robotics it is most often a simulated teacher policy or planner
  • The expert must control the robot while data is collected — in DAgger the learner usually acts and the expert only labels, which is what exposes the learner's own mistakes
  • DAgger removes the need for an expert after the first round — the expert must be available to label states in every round of training

Who should know this

  • Robot learning researchers using imitation learning
  • Engineers building teacher–student sim-to-real pipelines
  • Legged locomotion and drone autonomy developers
  • Students studying imitation and reinforcement learning

Related technologies

  • Behavior Cloning
  • HG-DAgger
  • Policy Distillation
  • Isaac Gym
  • Reinforcement Learning

Related terms

  • Imitation Learning
  • Behavior Cloning
  • Teacher-Student Training
  • Reinforcement Learning
  • Sim2Real

Related projects

  • LeRobot: HuggingFace ML library for real-world robotics in PyTorch
  • OpenPI: Physical Intelligence VLA foundation models for general robot control
  • NVIDIA Isaac GR00T: NVIDIA open foundation model for humanoid robot reasoning and skills
  • Mobile ALOHA: Bimanual mobile manipulation with 4 robot arms on a wheeled base for teleoperation
  • OpenArm: 7DOF humanoid arm for physical AI research in contact-rich environments
  • Koch v1.1 Low-Cost Robot Arm: Open-source 6-DOF robot arm for affordable teleoperation and imitation learning research.

This website requires JavaScript to function properly. Please enable JavaScript to explore our collection of open source robotics projects.