Skip to main content
DAgger collection runs a trained policy on Axol while you watch in VR. When the policy goes wrong, you take over with the controllers and correct it. Axol records both the policy’s motion and your corrections into a LeRobot dataset. Retraining on that data teaches the policy the cases where it struggles. The method is called DAgger. The policy drives the arms as in Run Policy, and you take over as in Data Collection. Run it on the same computer: the one wired to the robot with the ZED cameras attached. Start it from the web control panel or with axol collect-dagger.

Before you start

  • Install Axol with the one-command install. Bring up CAN and check the motors.
  • Connect at least one of the ZED cameras the policy was trained on, and have their serial numbers ready. See the Data Collection tip for how to list them. Use the same cameras, resolution, stereo setting and recording rate the policy was trained on.
  • Have a trained checkpoint and its policy type (act, smolvla, pi0 and so on). The checkpoint can be a local path or a HuggingFace repo.
  • Inference runs on this computer. You need a PyTorch build with CUDA, or pass --device cpu. On a Jetson, the hosted install comes with the CPU-only PyTorch build. Axol’s updater doesn’t replace a JetPack-compatible build you installed yourself.
  • Authorize the VR certificate and have the headset ready. You correct the policy from it.
Load only checkpoints and datasets that you made or got from a source you trust. Model and dataset loading is not sandboxed.

Run it

1

Connect the robot and assign cameras

Connect the Host Computer and Axol. Under Axol settings → Cameras, assign at least one of the cameras the policy was trained on, with recording on. See Cameras.
2

Select Collect DAgger data and fill in the fields

Pick Collect DAgger data and fill in Policy path, Policy type, Task and Repo ID. To add to an existing DAgger dataset, enter its repo ID. Stiffness, rates and inference settings are in the Settings tabs.
3

Start, then correct from the headset

Press Start and connect the headset. Start and end episodes from the Episode control box. Use the grips to take over and hand back during an episode, as described in Intervening. The panel shows the camera feeds and episode state, so you can follow along with the headset off.

Intervening

During an episode, the policy drives the arms. Use the VR grip buttons to take over when it needs help, and to hand back when it has recovered:
  • Tracking starts from where the arms are, so the arms don’t jump when you take over.
  • The grippers follow your triggers as soon as you take over. Set the triggers before you press the grips. To keep a part held, hold the trigger down.
  • When you hand back, the policy plans from where you left the arms.
  • Nothing is recorded while the arms are frozen. The episode runs straight from the policy’s motion into your correction and back.
With a custom policy, the grips work differently. Hold a grip to drive that arm, and release both to hand back. See Run Your Own Policy.
If the headset link drops while you drive, tracking disengages and the policy takes over again.

Episodes

You start and end episodes from VR, as in data collection:
  • Press Record (A) to start an episode. The policy starts driving and recording begins.
  • Press Record again to save the episode.
  • Hold Reset (X) and press Record to discard the episode and record it again.
  • In the terminal, s saves, r discards and q discards and quits.
  • --episode_time_s limits each episode, 600 s by default. When it runs out, the episode is saved.
  • With --subtasks set, type a number from 1 to N to switch the policy’s instruction during the episode. The dataset keeps --task as its task.
The panel’s Episode control box has the same Start episode, Save, Discard and Return to rest buttons as run policy, so you can run a session with the headset off.

Between episodes

Between episodes, the arms return to the rest pose, so every episode starts in the same place.
  • The grips work as plain teleoperation, so you can reset the scene with the arms. Press both grips to engage and one to release. Nothing is recorded.
  • Press Reset in VR to send the arms home. If you leave the arms away from rest, they also return home when you press Record.
Every return to rest is guarded, as in data collection and run policy. If an arm meets resistance, the move stops and the arms go limp in a gravity-compensation hold. Move them clear by hand, then press Reset in VR or Return to rest in the panel. Set the sensitivity with Return-to-rest contact stop in the panel, or --teleop_config.vr_teleop_config.reset_torque_threshold (default 6.0 Nm, 0 turns it off).

What gets recorded

Each saved episode is one continuous take: the policy’s motion, your correction, then the policy again, with the frozen gaps left out. Each frame has an intervention flag. It is True on frames you drove and False on the policy’s frames, so training can weight or filter your corrections. DAgger datasets save and resume like collect-data datasets. You can resume only a dataset that has the intervention flag, which means one recorded with collect-dagger.

Next steps

Config Parameters

Every setting for DAgger collection, with its default.

Train a Policy

Retrain on the combined demonstrations and corrections.

Run Policy

Run the retrained policy without corrections.

collect-dagger reference

Every flag for DAgger collection.

Data Collection

Record new teleoperation episodes from scratch.