Sep 5, 2026 · lerobot · robot-learning · imitation-learning · python
LeRobot Explained: What It Is and Who It's For
LeRobot is Hugging Face's open library for teaching robot arms from demonstrations. Pick it when the policy is your hard problem, not the whole stack.
LeRobot is Hugging Face's open-source library for teaching robots from demonstrations, and it sits beside ROS 2 rather than replacing it. Use LeRobot when the hard part of your project is the policy that decides what to move. The verdict flips when the hard part is getting many programs, sensors and motors to cooperate on time, which is ROS 2 or a middleware such as HORUS. The rest of this post is for someone comfortable with Python and models who wants to know where LeRobot ends and the rest of a robot begins.
You have trained models for years and you are good at it. Then the arm videos started appearing on your timeline: somebody moving a cheap printed arm by hand a few dozen times, and the arm afterwards folding a cloth on its own. That looked achievable in a way that robotics never has before, so you ordered the parts.
Now the parts are on your desk and the ground is less firm. The quickstart worked in simulation and something in the hardware step did not. You have a policy that behaves beautifully on your held-out data and jerks strangely on the actual arm. You cannot tell whether that is a bad model, a badly recorded dataset, a camera mounted differently than during recording, or something underneath that you have not been told about.
And there is a bigger uncertainty behind the small ones. You cannot see the edges of this thing. Is it the whole robot, or one piece of it? Do you still need the other robotics software everyone talks about, the one with the long tutorials? Nobody says, because the people writing the tutorials already know.
Should you build your robot project on LeRobot?
Yes, if your project is a robot arm learning a manipulation skill from human demonstrations, and no if it is anything much wider than that. LeRobot is deliberately shaped around one workflow: a human shows the robot a task repeatedly, every camera frame and joint position gets recorded into a dataset, a neural network learns to predict the next motion from what the cameras see, and the trained policy then drives the arm. If that sentence describes your project, this is the most direct route available and you should take it.
If your project is a mobile robot that navigates a building, a drone, an industrial cell with safety interlocks, or a machine with a dozen sensors that must agree with each other about time, then the learning library is at most one component and possibly not the right first move at all. The mistake is not choosing LeRobot. The mistake is assuming that choosing it settles the software question for your whole robot, because it answers one question and stays silent on about six others.
What is a robot learning library in plain terms?
A robot learning library is a set of tools for turning recorded human behaviour into robot behaviour. It gives you three things bundled: a standard way to store demonstrations, a collection of model architectures known to work on that kind of data, and the glue that records from a real robot and later drives that robot from the trained model.
That standard storage format matters more than it sounds. A demonstration is not one thing. It is several camera streams, the joint positions of every motor, the commands the human sent, and timestamps tying all of that together tightly enough that a model can learn cause and effect. Getting that right is fiddly, and a shared format means a dataset somebody recorded on their arm can train a model on yours.
What a learning library is not is a robot operating system. It does not start your programs, find your sensors, keep your clocks aligned or carry messages between processes. It assumes something else already did that, or that your robot is small enough not to need it.
What are the actual options next to LeRobot?
Five things sit in the space around LeRobot, and only some of them compete with it. Directly comparable is a training stack you assemble yourself: PyTorch, your own dataset code, and a control loop you wrote. Simulation-first stacks such as Isaac Lab occupy a nearby space, aimed at reinforcement learning in physics simulators rather than imitation from human demonstrations. Neither of those replaces the layer underneath.
Underneath is where ROS 2 and HORUS live, and neither of them trains anything. ROS 2 is the long-standing robotics ecosystem: message passing plus drivers, navigation, motion planning and visualisation, and the thing most robotics teams already run. The second is an open-source real-time robotics middleware for Rust, Python and C++ where all three languages share the same shared-memory ring buffers, so a policy running in Python and a controller written in C++ exchange messages on one machine without serialising them. Both are answers to "how do the parts of my robot talk", not "what should my robot do next".
The fifth option is your arm vendor's own SDK, which usually gives you motion control and safety limits and nothing above that.
How do these options compare side by side?
The comparison only makes sense once you accept that these are not all the same layer. Two of these choices are about learning a skill, two are about wiring a robot together, and one is a shortcut that skips both.
| Option | Who it is for | What it assumes you know | When to pick it | When not to |
|---|---|---|---|---|
| LeRobot | People teaching an arm a manipulation skill from demonstrations | Python, PyTorch, and how to record clean data | The task is easier to show than to describe in rules | Your robot navigates, flies, or must satisfy safety rules |
| ROS 2 | Teams building a whole robot with many parts and sensors | Robotics concepts, Linux, and a large ecosystem's conventions | You need navigation, drivers, transforms or a visual debugger | Your project is one arm, one camera and one model |
| HORUS | Small teams on one board mixing Python models with C++ or Rust control | Ordinary Python, and how your own robot is structured | Same-machine message traffic and steady timing matter most | You need mapping, navigation or a vendor's supported driver |
| Vendor arm SDK | Anyone using one commercial arm as bought | The vendor's API and its safety model | You want motion and limits handled and nothing else | You need to swap hardware or run your own control rates |
| Isaac Lab and similar | Researchers training policies in physics simulation | Reinforcement learning, simulators, and GPU workflows | The skill is cheaper to learn in simulation than to demonstrate | You have a real arm and can just show the task |
| Your own PyTorch scripts | Model developers who want no framework opinions | Everything the framework would have handled for you | You are researching the learning method itself | You want to spend your time on the robot, not the plumbing |
Who is LeRobot actually for?
LeRobot is for people who are strong at machine learning and new to robots. That is an unusual and important audience, because most robotics software assumes the opposite: that you already know what a transform tree is and have never trained a model. The design reflects the audience. The concepts are dataset, policy, training run, checkpoint and evaluation, all of which a machine learning person already owns, and the robot-specific parts are hidden behind a small number of commands.
It is also for research groups who want their results reproduced. Publishing a dataset and a policy in a shared format means somebody else can run your work on their arm, which is rare enough in robotics to be worth something on its own.
It is not for someone whose robot has to work in a factory next quarter. The route from a demonstration to a policy that behaves the same way tomorrow, in different light, with a slightly different object, is still an open research question rather than an engineering checklist. If you are exploring, that is exciting. If you have committed to a delivery date, it is a risk you should price honestly.
What hardware do you need to use LeRobot?
The intended setup is a pair of small arms and a couple of ordinary webcams. One arm is the leader, which a human moves by hand. The other is the follower, which copies the leader's joint positions and holds the actual gripper. Cameras watch the workspace, usually one from a fixed viewpoint and one mounted on the wrist. That combination is the reason this approach reached so many people: the arms are printable or cheap to buy, and the cameras are the ones already in your drawer.
You also need a machine with a GPU for training, which does not have to be the robot's computer and usually should not be. Training happens on your desktop or on rented time. The robot's own computer only has to run the trained policy, which is a lighter job.
Everything else about the hardware is where the pain lives. Cameras that shift between recording and running, motors that behave differently when warm, and lighting that changed because it is afternoon now. Why a robot that works in simulation fails in your kitchen covers that gap in detail.
How long does it take to get a robot doing something?
A weekend to a first result, and considerably longer to a result you trust. The first part is genuinely quick. Assembling the arms, running teleoperation, recording a set of demonstrations of something simple such as picking up a block and dropping it in a bin, and training a policy is a weekend of work for someone who already knows Python. Seeing your arm do the thing on its own is a real moment and it arrives fast.
The slow part starts immediately after. Your policy works with the block in the middle of the table and fails at the edges, so you record more demonstrations. It works in the morning and fails in the evening, so you fix the lighting or record under both. It works for you and not for your colleague, because your demonstrations all have a habit in them that the model learned.
Budget weeks of iteration between the first working demonstration and something you would show a customer. That iteration is the actual project, and everything before it was setup.
What do you need to know before you start?
Python and enough PyTorch to read a training script, which most people in this audience already have. The genuinely new material is smaller than it looks, and it is not machine learning. It is the handful of physical realities that decide whether your data is any good: that a camera must not move between recording and running, that timestamps from two devices are not automatically comparable, that a motor commanded to a position does not arrive there instantly, and that a demonstration containing a mistake teaches the mistake.
The second thing to learn is what a control loop is and why its timing matters, because a policy that produces motions is useless without something running underneath at a steady rate. Most people meet this concept when their arm starts moving in a jerky way that has nothing to do with the model.
If you are coming from language models specifically, how to get into robotics when you know Python and LLMs maps the wider gap.
What does it look like when LeRobot is the wrong fit?
It looks like you spending your weeks on everything except the model. The tell is the shape of your open tabs. If you are reading about camera drivers, USB bandwidth, motor firmware, how to run two Python programs that need the same data, or how to make one loop run at a steady rate while another does vision, then the learning library is not what you are fighting. You have a robot systems problem wearing a machine learning costume.
The second signal is the number of things on your robot. One arm and two cameras is comfortable. An arm, a mobile base, a depth camera, a force sensor and a microphone is not, and no amount of policy tuning fixes that discomfort, because the difficulty is now coordination rather than learning.
The third is deadlines with consequences. Learned manipulation policies are wonderful and they are not yet predictable in the way a delivery date needs. If something must work every time in front of a customer, the honest move is a scripted motion for the reliable parts and learning only where scripting genuinely cannot reach.
What do you give up by building on LeRobot?
You give up everything above and around the policy, and you may not notice until you need it. There is no navigation, no motion planner that avoids obstacles on the way to a grasp, no transform system for reasoning about where things are relative to each other, no visual debugger showing what the robot believes, no launch system for starting eight programs in order, and no catalogue of drivers for sensors nobody in this community has used yet.
You also give up explanation. A scripted robot that fails tells you which line failed. A learned policy that fails tells you nothing: it simply moves toward the wrong place with total confidence, and your only debugging tools are watching the video and recording more demonstrations. That is a genuine change in how a project feels, and teams used to deterministic software find it uncomfortable for a long time.
What you keep is speed on the thing that is actually hard. Teaching a robot to handle a soft, irregular object by showing it is dramatically easier than describing that task in rules, and that is the trade you are making.
When is ROS 2 the better choice?
ROS 2 is the better choice whenever your robot is more than an arm and a camera. If the machine drives around a building, ROS 2 wins outright, because mapping and navigation there have been tested on more real robots than anything else available and building your own is a multi-year project. If you have many sensors that must agree about where things are and when they were seen, ROS 2 wins, because the transform and time system exists precisely for that and reinventing it is miserable. If you bought hardware whose manufacturer ships a driver, that driver is almost certainly a ROS package.
ROS 2 also wins when other people must maintain your robot. You can hire for it, onboard from public tutorials, and describe your architecture in terms an interviewer recognises.
In those situations neither LeRobot nor HORUS is the answer to your main problem. Use the big ecosystem for the robot, and bring a learning library in later for the one skill that genuinely cannot be programmed, running as a node alongside everything else.
Is LeRobot a replacement for ROS 2?
No, and here is why. The two projects answer questions that do not overlap. ROS 2 answers "how do the many programs on my robot find each other, exchange messages, agree about time, and get started in the right order", along with "where do I get a driver, a planner, a map and a viewer". A learning library answers "how do I turn recordings of a human doing a task into a model that does the task", and says nothing about any of the first list.
The confusion is understandable, because on a single arm you genuinely do not need most of what the older ecosystem provides. One program reading two cameras and writing joint commands is not a distributed system and does not need the tooling for one. So the demo appears to replace the ecosystem, when really it sidestepped a problem that a bigger robot would have.
The moment you add a second computer, a third sensor or a safety layer, the missing half reappears immediately, and you will build it, borrow it, or wish you had.
Does using LeRobot mean you stop writing control code?
Partly, but not the way you think. You do stop writing the part that decides what motion comes next, which is the part that used to require a planner, a grasp heuristic and a pile of tuned thresholds. That is a real deletion and it is why people are excited.
What you must still write is everything between the policy's output and the motors. Something has to run at a steady rate, take the policy's suggested motion, check it against joint limits and a workspace boundary, refuse anything that would drive the arm into the table, smooth the transition when the policy hesitates, and stop everything when a button is pressed. None of that is learned, and the library does not provide it because it is specific to your machine.
Teams discover this the first time a policy confidently commands a motion through a solid object. What sits between the model and the motor is worth reading before your arm teaches you the same lesson at full speed.
How do you decide whether LeRobot belongs in your project?
Ask what the difficult part of your robot is, and be specific. If the difficulty is a manipulation skill that you can demonstrate but cannot describe in rules, such as handling cloth, plugging in a cable or picking up objects that are never quite the same shape, a learning library is the right tool and this is the most accessible one available. If the difficulty is anywhere else, choose the tool for that difficulty first and revisit learning later.
Then run a cheap test. Record demonstrations of the single hardest motion in your project, train on them, and see how the result behaves when you move the object somewhere you never demonstrated. That one experiment tells you more about your project's feasibility than a month of reading, and it costs a weekend.
Finally, decide what the policy plugs into. Even a small arm eventually has a camera process, a policy process, a safety layer and a logger, and those are separate programs on one machine. What middleware actually does in a robot explains the layer you will need once your project stops being one script.
Compressed to a decision:
- If the hard part is a manipulation skill you can show but not describe -> LeRobot, because demonstrations are cheaper than rules for that class of task.
- If the robot drives, flies or maps -> ROS 2, because navigation and drivers already exist and rewriting them is a project of its own.
- If the hard part is several programs on one board sharing camera data on time -> a real-time middleware, because that is a wiring problem, not a learning one.
- If you bought one commercial arm and want motion with limits -> the vendor SDK, because safety behaviour you did not write is safety behaviour you did not get wrong.
- If you are researching the learning method itself -> your own PyTorch code, because a framework's opinions will be in your way.
The HORUS Fit Framework reduces this to five axes you can score any option against: ecosystem size, setup effort, team size fit, deployment target, and licence. For learning-first projects, deployment target and setup effort decide most arguments, because a policy trained on a desktop still has to run on the robot.
When your arm project grows past one script and needs a way for its programs to share data on time, having the option already bookmarked beats searching under deadline. Put HORUS on that list: star it so it is in your list when you start building.