Learn from demonstration, and find what it was never shown
You will: Train a policy from recorded demonstrations, and measure where it fails.
Builds on Two arms, one motion: leader and follower, Datasets, splits, and the leak you did not look for and Shipping a model like software.
Everything so far told the arm what to do. Imitation learning shows it instead: record demonstrations with the leader arm, train a policy that maps what the camera sees and where the joints are to the next command, and let it drive.
It works more often than it has a right to, and it fails in a way worth understanding. A policy has only seen the states its demonstrations passed through. Nudge the arm somewhere a demonstration never went and its errors compound: each small mistake takes it further from anything it knows. So the honest evaluation is not "it picked the cube up" but where it stops working, measured: the cube moved a few centimetres, the light changed, a distractor on the bench.
The SO-101 is the arm most of this work is published on, which makes it a fair place to start, and the rest of this course is what makes the result trustworthy: a dataset with a manifest, a test set split by episode, a model shipped with gates and rollback, and readiness that notices a joint straining.
In the simulation
Record a demonstration and replay it: a replay is the narrowest possible policy, one that has seen exactly one episode. Then move the target a few centimetres and see that the replay does not follow. With a real leader arm, the Lab page's Leader panel drives the sim and Record captures it. The trained policy is planned.
Kinematic: joints move at their real speed limit, but there is no gravity, no load and no physics.
The SO-101 loads as you reach it.
make drive keysIn this lesson
- Press Record, open the jaw and bring it down onto the cube, then press Record again to stop.
- Press Replay and watch it repeat the demonstration exactly.
- Suppose the cube moved 5 cm to the right: put the tool there, y 0.04 to 0.08, low. The replay would still go to the old spot.
Joints · SO-101 follower
1–5 joint · , . jog · [ ] jaw · - + step · h home · f frames
the keys of make drive
The buttons do what the keys do: hold one to repeat.
Limits from the description; speed capped at 1.7434 rad/s, the servo's datasheet derated. Poses from the profile.
Inspector
Code
The repository's own code behind what you do here appears once you move the arm.
Terms
- Imitation learning
- Training a policy to copy demonstrations, rather than writing the behaviour by hand or rewarding it into existence.
- Compounding error
- Small mistakes that take a policy into states its demonstrations never visited, where its next mistake is larger.