Teaching a Robot Arm to Pick and Place
Fine-tuning GR00T N1.7 to pick and place with an SO-101 arm using imitation learning and DAgger.
This post fine-tunes NVIDIA’s GR00T N1.7[1] to pick up a cube and drop it in a box with an SO-101 arm, using only demos recorded by hand. It covers the whole loop, from recording the demos to running the policy on a Jetson Thor.
The video above shows the final policy on six attempts in a row, with nobody steering. It looks at two cameras and plans the next joint angles about every 0.7 seconds. The cube starts somewhere new each time, the box is moved and turned, and the last two cubes are purple. Every demo used a red one.
The policy improved over three rounds of training, with longer training runs, corrections based on observed failures, and greater diversity in cube positions.
How behaviour cloning works
Behaviour cloning is a form of supervised learning where the actions serve as labels. A demonstrator performs a task while we record the camera observations and corresponding actions. The network learns to predict the demonstrator’s actions from camera frames. Once trained, it uses those predictions to control the arm autonomously, as shown in the three-step diagram.
The input at each step is an observation. Here that is two camera frames, the six joint readings and a line of text naming the task. The output is an action, the six joint angles the arm should move to next.
Action chunking
A policy that predicts one action at a time must make the right decision hundreds of times during a task. Even small mistakes can gradually push the arm away from the trajectory seen in the demonstrations. Each subsequent decision then starts from a slightly different state. Eventually, the robot may reach a state it never encountered during training, making its next prediction less reliable and causing errors to compound.
To address this, modern robot policies predict a short sequence of actions, known as an action chunk, from a single set of camera observations[2]. This helps in two ways.
First, planning a chunk at a time means fewer decisions, so there are fewer chances for errors to accumulate. Second, demonstrators sometimes pause in the middle of a task. In the demonstrations, the same camera view may be followed by either a pause or a movement. A policy that predicts one action at a time may struggle to distinguish between the two. An action chunk can capture both the pause and the movement that follows it[2]. By predicting the sequence together, the policy can account for how long to wait before moving again. The pause simulation illustrates how the two policies handle this situation.
Our policy predicts 16 steps but executes only the first 8 before observing the scene again, as the chunk diagram shows. The remaining 8 steps are discarded for two reasons. First, they extend furthest into the future and are therefore the least accurate, as the error along the chunk shows later. Second, replanning halfway through allows the policy to respond to the latest camera observations, such as a cube slipping in the gripper.
The model
We fine-tune GR00T N1.7[1], a 3-billion-parameter model designed for robotics. As shown in the model figure, it has two main components. A vision-language model converts the camera frames and task instructions into a sequence of tokens. An action head then takes those tokens along with the robot’s joint readings and predicts a 16-step action chunk.
The action head uses a technique called flow matching. It starts with random noise shaped like an action chunk and refines it over four steps into a complete plan.
This matters because robot tasks are often multimodal, meaning the same camera observation can correspond to multiple valid actions. Consider the example in the figure below, where an obstacle lies between the arm and its goal. The demonstrations show two valid ways to reach the goal, passing on either side of the obstacle. A deterministic policy trained with mean squared error (MSE) loss learns to predict the conditional mean of the demonstrated actions for a given observation. When the demonstrations contain two distinct modes, this prediction can fall between them, producing a trajectory that goes straight through the obstacle.
Flow matching addresses this by learning a conditional velocity field that transforms random noise into demonstrated action sequences. This allows the model to capture the full distribution of possible actions for a given observation, including multiple distinct modes. At inference time, the model samples an action sequence from this distribution, producing one of the valid solutions rather than averaging across them.
The robot and the setup
The arm is an SO-101, a 3D-printed robotic arm with six hobby servos from the LeRobot project[3]. It comes as a matched pair, a leader and a follower, shown in the arm photos. We collect demonstrations through teleoperation, where a human demonstrator moves the leader by hand and the follower mirrors its movements.
The leader’s motors are disabled, allowing its joints to move freely while its servos report their angles. The follower continuously reads these angles and drives its own six joints to match the leader’s movements. During demonstrations, we record the leader’s joint angles as actions and the camera frames as observations. Once trained, the policy replaces the leader by sending predicted joint angles directly to the follower.



The joint figure shows the six joints, and the 3D arm lets you move each one. The gripper reads 0 when closed and about 100 when open.
The hardware setup follows NVIDIA’s course, Train an SO-101 Robot From Sim-to-Real With NVIDIA Isaac[4]. It covers building the workspace and calibrating and driving the arm. This build changes a few things. The cameras sit in new places, a cube and a 3D-printed box replace the vials and the rack, and everything runs on the Thor. The training recipe is my own.
The rig photo shows the workspace.

Everything runs on an NVIDIA Jetson AGX Thor next to the arm. It records the demos, trains the model and runs it on the arm. The rig figure shows how the pieces connect.
| part | what it is |
|---|---|
| arms | SO-101 leader and follower, 6 Feetech STS3215 servos each |
| overhead camera | Arducam, 1280 x 720 at 30 fps |
| wrist camera | on the gripper, 640 x 480 at 30 fps |
| computer | NVIDIA Jetson AGX Thor |
| model | GR00T N1.7, 3B parameters |
| recording rate | 15 frames a second |
Round 1, fifty demos
Recording the demos
To record a demo, the leader arm is moved by hand, and the follower arm copies every move. The teleop clip shows one demo as it is recorded, with a view of the rig on the left and the two robot cameras on the right.
A demonstration is not stored as a single video. Instead, it is stored in the LeRobot dataset format, as shown in the storage figure. The robot’s data is stored in Parquet files, with one row per frame at 15 frames per second. Each row contains a timestamp, the follower’s joint positions (the state), and the leader’s joint positions (the action). The action serves as the label that the network learns to predict.
Camera recordings are stored separately as video files, one per camera. Multiple demonstrations can share the same Parquet file and camera videos. Each demonstration records its starting position in the videos, allowing the corresponding camera frames for any row to be located using its start time and timestamp.
The first round consisted of 50 demonstrations, each showing a successful grasp and drop. The grid plays all 50 demonstrations simultaneously.
Training
Training starts from the released GR00T weights and adjusts them on our demos. Training also runs on the Thor. It is slow compared with a data-centre GPU and would not suit a large dataset, but it is enough for a dataset this size. One step takes about a second on the Thor.
| setting | value |
|---|---|
| starting weights | GR00T N1.7-3B |
| batch size | 8 |
| peak learning rate | 1e-4 for the first run, 5e-5 for each run after it |
| schedule | 5% warmup, then cosine decay to zero |
| image size | 256 x 256 per camera |
| speed on the Thor | about 0.96 steps a second |
Both cameras have to reach the model as 256 x 256 squares. The overhead frame is wide, and the arm enters it from the right edge. A centre crop would cut the arm out of the picture, so we pad the frame with black bars instead, as the letterbox figure shows.
The first run trained for 15,000 steps. On the arm it often carried the cube past the green box, as the arm tests below show. To see whether more training would fix this, a second run continued from the first run’s weights, using the same demos but a fresh learning rate schedule, for a total of 30,000 steps. The round 1 runs show both training runs.
The loss plot shows both runs. The second one starts its learning rate schedule over, so its loss jumps a little and then falls again. It ends slightly lower, about 0.044 against 0.047.
Testing, open-loop
The simplest way to evaluate a policy is through open-loop testing. We feed it recorded camera frames from a demonstration and compare its predicted action chunks against the recorded actions. Because this requires no physical robot, it is cheap, repeatable, and fast enough to run after every training checkpoint. It helps us track whether the policy is learning to reproduce the demonstrated behaviour and catch regressions before testing on hardware.
The table below gives the open-loop error of each round 1 checkpoint on 6 of the round 1 demos, over the 8 steps of a chunk the arm runs and the 8 it throws away. This test was run again retrospectively, after round 2, so the demos have their still frames cut, as described in the still-frame cleanup. Every checkpoint is scored on exactly the same frames. The error is the mean squared gap between the predicted joint angles and the recorded ones, in the units the motors report. It is about two and a half times larger on the last 8 steps than on the first 8. This is the reason we run only the first 8.
| checkpoint | steps 0 to 7 run on the arm | steps 8 to 15 thrown away | all 16 steps |
|---|---|---|---|
| 10k | 15.72 | 42.05 | 28.88 |
| 12.5k | 15.13 | 38.46 | 26.80 |
| 15k | 17.17 | 39.01 | 28.09 |
| 25k | 14.87 | 35.55 | 25.21 |
| 27.5k | 13.18 | 31.33 | 22.25 |
| 30k | 12.99 | 34.43 | 23.71 |
We kept 27.5k, which scored lowest in the open-loop test run at the time. On these demos 30k scores about the same over the 8 steps the arm runs, and 27.5k is lowest over the whole chunk.
Testing, on the arm
On the arm, both round 1 checkpoints struggled with picking and placing. The gripper often hit the top of the cube before closing, and the arm often carried the cube past the green box before releasing it. The clip of the 15k checkpoint shows this. The first three attempts put the cube in the box, but not cleanly, and on the fourth the arm carries the cube past the box and out of the frame.
The extra training did not fix this. The 27.5k checkpoint, the best one open-loop, still overshot.
Open-loop testing cannot see this kind of failure, and the open-loop diagram shows why. In an open-loop test the next frame always comes from the demo, whatever the policy predicted. On the arm the next frame comes from what the policy just did, mistakes included.
A small mistake can push the arm into a pose that never appeared in the demonstrations. None of the round 1 demos shows how to recover from such a pose. The policy therefore has no demonstrated behaviour to imitate, making its next prediction less reliable and often leading to larger errors. Ross and colleagues showed that over a task of steps, the total error of plain behaviour cloning can grow quadratically with the task length, , rather than linearly, [5]. The drift figure illustrates this effect using a toy model.
More training on the same demos cannot fix this. The next two rounds add data instead.
Round 2, human corrections
Round 2 adds recordings of the policy’s own mistakes being fixed. It also cleans up the demos by cutting long still stretches.
Learning from mistakes with DAgger
DAgger, short for dataset aggregation, collects data from the places the policy actually goes[5]. Let the policy drive, ask a person what they would have done in the states it reached, add those labels to the demos, and train again. The DAgger diagram shows one round.
Labelling every step is slow, and a person watching the arm without steering it gives poor labels. HG-DAgger, short for human-gated DAgger, fixes both problems[6]. The human decides when to step in. The policy drives, and the person takes over only when it starts to go wrong. Only the takeover is saved, as the takeover diagram shows.
On our rig the 27.5k checkpoint drives the follower arm while the leader arm is held at the follower’s pose. When the arm starts to go wrong, pressing Tab hands control back to the leader. From then on the follower copies the leader, as in a demo. Each correction is saved as its own episode, starting 1 second before the takeover, as the correction diagram shows. The extra second is kept for reference but excluded from training, since those actions were generated by the policy rather than the person. As a result, each training example starts at the takeover point, from a pose that never appears in the clean demos.
There were 12 corrections, and the correction grid plays them all.
A cleanup, cutting the still frames
Every demo contains dead time, such as a wait before the first move and a hold at the end. NVIDIA’s guidance for fine-tuning GR00T recommends trimming these idle frames. A pause longer than an action chunk gives the policy no indication of when to resume moving, so round 2 included a cleanup step to remove them.
A detector identifies these stretches using the leader arm’s joint readings. A frame counts as still when no joint moves more than its natural resting jitter. Stretches lasting at least half a second are removed, with a few exceptions. The half-second lead-in before the first move and one second at the end are preserved. Brief pauses during grasping and releasing are also kept because they are part of the task. The still-frame figure shows the result on one demo.
Across the demos this removed 4.6% of the frames.
Training on the corrections
Twelve corrections against 50 demos is a small amount of data, so each correction was used three times in training. The third run continued from 27.5k, the round 1 checkpoint we kept, for 10,000 steps on the cleaned demos plus the corrections, as the round 2 runs show.
On the same 6 round 1 demos as the round 1 table, the open-loop error fell on both halves of the chunk.
| checkpoint | trained on | steps 0 to 7 run on the arm | steps 8 to 15 thrown away | all 16 steps |
|---|---|---|---|---|
| 27.5k | 50 demos | 13.18 | 31.33 | 22.25 |
| 37.5k | 50 cleaned demos, 12 corrections used 3 times | 12.06 | 28.30 | 20.18 |
Round 3, a wider spread
The first 50 demos had a quieter problem. The cube started in almost the same spot every time. The cube map shows where the cube started in every demo, drawn on the overhead view.
A policy trained only on the first cluster has never seen the cube anywhere else. So a second batch of 50 demos was recorded with the cube spread across the mat, about five times wider, as the round 3 grid shows.
The fourth run continued from 37.5k for another 30,000 steps on all 100 demos plus the corrections, as the round 3 runs show. The mix diagram shows what that final model trained on.
The checkpoint chart measures every checkpoint separately on old and new demos. Every model up to 37.5k had never seen the second batch, and its error on it was about 20 or higher. After the fourth run the best checkpoint, 62.5k, got 9.6 on the new demos and 11.5 on the old ones, so it learned the new spots without forgetting the old ones.
The loss of all four runs puts the three rounds on one step axis.
Results
The 62.5k checkpoint is the one on the arm. The rollout at the top is one five-minute run of it, with six attempts and six cubes in the box. Two of those cubes are purple. Every demo used a red cube, and the task text still says “red cube”.
The clip below is another, simpler run of the same checkpoint, filmed on a phone. The cube starts close to the same spot each time, and only red cubes are used. It is sped up about four times. On the arm each attempt takes 40 to 55 seconds, so the clip fits seven attempts into 80 seconds. It is played uncut, so every attempt can be checked.
| checkpoint | data | on the arm |
|---|---|---|
| 15k | 50 demos | overshot and let go late |
| 27.5k | same demos, 15k more steps | still overshot |
| 37.5k | + 12 corrections, + still frames cut | no overshooting at drop-off |
| 62.5k | + 50 wider demos | 7 of 7 and 6 of 6 in the runs shown |
Latency, where the time goes
The policy server runs the model in plain PyTorch. On the arm a new chunk starts every 0.70 seconds. Playing its 8 actions at 15 per second takes 533 ms (8 / 15 × 1000), so for the other 164 ms the arm holds still while the policy computes the next chunk, as the cycle diagram shows. Timed directly on the Thor, one call of the model with both camera frames takes about 159 ms, so almost all of that wait is the model itself.
Removing the wait with real-time chunking
One way to remove that wait is real-time chunking. It asks for the next chunk while the current one is still playing[7], and plans it to agree with the actions still to come, so the arm does not jump when it switches. The timing figure compares the two.
Wrapping up
This post took GR00T N1.7 from its released weights to a policy that picks up a cube and drops it in a box on a real SO-101 arm.
The main takeaway is that pretrained models like GR00T are already a strong starting point. With a small amount of data, recorded in a few hours, a policy reaches reasonable performance on a robot arm in a controlled setting. When it fails, approaches like DAgger fix it with a handful of corrections. Imitation learning and DAgger alone go a long way.
A second lesson is that a good open-loop score does not mean the policy works on the arm. Its mistakes only show up once they decide what the cameras see next, so most of the progress came from collecting the right data rather than from more training.
Several things are worth trying next. Real-time chunking and a quantized model would cut the pause between chunks. More varied scenes, with cubes of several colours on the mat and different drop-off spots, would need more demos and a task text that names the target cube.
Thanks for reading.
References
- [1] NVIDIA (2025). GR00T N1: An Open Foundation Model for Generalist Humanoid Robots. arXiv:2503.14734. https://arxiv.org/abs/2503.14734. The N1.7 weights used here are described in the GR00T-N1.7-3B model card, https://huggingface.co/nvidia/GR00T-N1.7-3B ↩
- [2] Zhao, T. Z., Kumar, V., Levine, S., & Finn, C. (2023). Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware. RSS 2023; arXiv:2304.13705. https://arxiv.org/abs/2304.13705 ↩
- [3] Hugging Face. LeRobot. https://github.com/huggingface/lerobot ↩
- [4] NVIDIA. Train an SO-101 Robot From Sim-to-Real With NVIDIA Isaac. NVIDIA Learning. https://docs.nvidia.com/learning/physical-ai/sim-to-real-so-101/latest/01-overview.html ↩
- [5] Ross, S., Gordon, G., & Bagnell, J. A. (2011). A Reduction of Imitation Learning and Structured Prediction to No-Regret Online Learning. AISTATS 2011; arXiv:1011.0686. https://arxiv.org/abs/1011.0686 ↩
- [6] Kelly, M., Sidrane, C., Driggs-Campbell, K., & Kochenderfer, M. J. (2019). HG-DAgger: Interactive Imitation Learning with Human Experts. ICRA 2019; arXiv:1810.02890. https://arxiv.org/abs/1810.02890 ↩
- [7] Black, K., Galliker, M. Y., & Levine, S. (2025). Real-Time Execution of Action Chunking Flow Policies. arXiv:2506.07339. https://arxiv.org/abs/2506.07339 ↩