Skip to content
Part of WiredWorkers · robot integrator in Wehl+31 314 700 590

Training a robot in simulation: what sim-to-real does and does not solve

Knowledge base · Training and software ·

Engineer testing a task in simulation

Short answer

Yes, part of the training can happen in simulation. Walking controllers are often trained with reinforcement learning in a simulator, and simulation also provides extra training data and test space without risk to people or the robot. The challenge is called sim-to-real: the difference between the virtual and the real world. Techniques such as domain randomization and tuning the simulator to measurements narrow that gap, but do not remove it. Simulation is therefore a complement to tests and data in your own environment, not a replacement.

In brief

  • Simulation is used for three things: training a controller (mainly walking), creating extra training data and testing a robot before it runs on hardware.
  • For walking control, reinforcement learning in simulation works well; in research, a humanoid controller was deployed on the real robot without additional training.
  • Domain randomization deliberately varies properties of the simulation during training, so that the controller does not learn in one perfect world.
  • System identification and actuator models tune the simulator to measurements on the real robot.
  • NVIDIA Isaac Sim is the simulator, Isaac Lab the training framework; according to its own repository, AgiBot Genie Sim runs on Isaac Sim.
  • A good result in simulation does not prove that the robot works in your environment; a test on the real robot remains necessary.

What simulation is for

In a simulation, a virtual version of the robot sits in a virtual environment, and software calculates how the robot moves and how objects react. Simulation is used for three purposes: training a controller, creating extra training data and testing a robot before the software runs on hardware.

NVIDIA Isaac Sim is a robot simulator. The documentation describes importing robots and scenes from URDF, MJCF and USD among others, two physics backends (PhysX and Newton) and testing the robot software before the hardware. Isaac Lab is the robot learning framework built on it. The Isaac Lab paper describes it as the successor to Isaac Gym, with parallel physics simulation, photorealistic rendering and support for reinforcement learning and imitation learning. When which approach fits is explained in imitation learning or reinforcement learning.

Walking control: where simulation is strongest

Walking is the best-known success of training in simulation. In reinforcement learning, a controller tries a movement thousands of times and receives a reward for what works. On a real robot, that takes time and breaks hardware. In a simulator, thousands of robots run at once on a single graphics card.

In Learning to Walk in Minutes, Rudin et al. showed that controllers for the four-legged ANYmal learn to walk in less than four minutes on flat ground and in about twenty minutes on rough terrain, on a single workstation GPU, and that the results were transferred to the real robot. Earlier, Hwangbo et al. reported that a controller trained in simulation made ANYmal run fast and get up from falls.

For humanoids, the evidence is more recent. Radosavovic et al. trained a controller with large-scale reinforcement learning in a collection of varied simulations and deployed it on a real humanoid without additional training. It walked over diverse outdoor terrain. That says something about walking. It says nothing about grasping and moving objects.

Domain randomization: vary what you do not know precisely

The simulator is never identical to reality. The Isaac Lab paper notes that parameters in the real world are hard to estimate precisely and can change over time. Domain randomization (randomly varying simulation properties) is the common answer. You do not make the simulation more accurate; you let the controller practice on a range of versions, so that the real world is one of them.

There are two variants, both from 2017:

  • Visual. Tobin et al. randomized the rendering in the simulator, with unnatural random textures. An object detector trained only on simulated images worked on real images.
  • Dynamics. Peng et al. randomized the physical properties. A controller that had to push an object with a robot arm kept the same performance on a physical robot without training on the real system.

Isaac Lab offers this as a standard component. According to the paper, friction, mass, gravity and armature inertia, among others, and for visuals textures, materials and lighting can be varied, and Automatic Domain Randomization adjusts the difficulty to the performance of the controller. The guide for a reach controller shows a concrete example: the stiffness of the joint control varies between 90 and 110 percent of the nominal value, the damping between 75 and 150 percent, and a small friction is added per joint.

System identification and actuator models

Domain randomization covers what you do not know. What you can measure, you tune better. That is called system identification: adjusting simulation parameters until the simulation follows the movements of the real robot well. The Isaac Lab paper cites as an example research in which evolutionary algorithms tune simulation parameters to trajectories of a real robot, and a study that modeled delays and torque limits of the motors for the robot dog Spot.

Motors are often the hardest part. The Isaac Lab documentation on actuators describes a series of models: from an ideal PD controller to a DC motor model with a speed-dependent torque limit, a model with delay and a neural network that predicts the torque from the joint history. According to the paper, such a network can be trained on hardware data to better mimic the response of the real actuator. For a small servo motor, the parameters of a model were determined from measurements. The documentation also warns that a controller trained with an implicit actuator model sometimes has to be adapted for an explicit model. For the transition to hardware, the scale of the actions and the control frequency of the real robot must match the simulation.

Synthetic data and evaluation

Besides control, simulation provides data. Isaac Sim has Replicator for this, with which you script randomization, record sensor output and write out labeled datasets. For demonstrations, Isaac Lab includes the Mimic tool. It cuts a human demonstration into subtasks around an object, adapts the movements to other positions of the object and robot, and stitches them back together. According to the paper, a single human demonstration can thus yield a large number of synthetic demonstrations, provided the environment is set up for it. The source remains human work, though: see teleoperation and data collection.

For evaluation, you run a controller in the simulator before it goes onto hardware. Isaac Sim itself names testing the robot stack before hardware as a goal. This lets you find errors in software and logic without risk. A successful simulation does not prove that the robot succeeds in your environment, because it only tests what the model of reality contains.

AgiBot Genie Sim as an example

AgiBot calls Genie Sim its simulation platform. According to the README on GitHub, it provides a toolchain for environment reconstruction, scene variation, data collection and automated evaluation. The benchmark runs with Isaac Sim 6.2, and data collection can be done with teleoperation via a VR headset or with automatic tasks that use cuRobo trajectory planning. AgiBot also makes available more than ten thousand hours of synthetic data for more than two hundred tasks in which a robot walks and manipulates something. Code and data are largely covered by the Mozilla Public License 2.0.

That is an example of how a manufacturer sets up the Isaac Sim chain for its own robots. The position of Genie Sim next to the training environment is described in Genie Studio vs Genie Sim; the evaluation side is covered in Genie Sim evaluation. Results that AgiBot cites about the transfer from simulation to real are the manufacturer's own measurements and not an independent test.

What this means for your project

Simulation is not a replacement for the real robot. It pays off mainly if a task has many variants, if errors on the real robot are costly or unsafe, or if the robot is not yet available. For a simple task with little variation, it is often faster to work directly with real demonstrations.

Ask a supplier who mentions simulation where the models come from: were the motors measured on the real robot, which properties were varied and which part was tested on hardware? Set success criteria in advance and test them on the real robot in your own environment. If you want to virtually rebuild your own workplace to test layout and processes, that is a digital twin, something different from training a controller.

Sources: Isaac Lab paper, Isaac Lab documentation, actuators, reach controller, Isaac Sim, Rudin et al., Hwangbo et al., Radosavovic et al., Tobin et al., Peng et al., GitHub genie_sim

Sources

Frequently asked questions

Can I train a robot entirely in simulation?

For walking, a controller can largely emerge in simulation; in research, a humanoid was deployed on the real robot without additional training this way. For tasks involving contact and varying objects, testing and often extra data in the real environment remain necessary.

What is the sim-to-real gap?

The difference between behavior in the simulator and in reality. Parameters such as friction, mass and the behavior of motors are hard to determine precisely and can change over time.

What is domain randomization?

A training method in which properties of the simulation, such as textures, lighting, friction or mass, are varied randomly for each practice round. The controller thus learns to handle a range of conditions, of which the real world is then one.

What is system identification?

Tuning the simulator to measurements on the real robot, so that the simulation better mimics the movements of the real unit. An actuator model trained from hardware data is an example.

What is the difference between Isaac Sim and Isaac Lab?

Isaac Sim is NVIDIA's robot simulator. Isaac Lab is a robot learning framework built on Isaac Sim that supports reinforcement learning, learning from demonstrations and motion planning.

Does AgiBot Genie Sim run on Isaac Sim?

Yes. AgiBot's README states that Genie Sim Benchmark runs with Isaac Sim. Genie Sim is AgiBot's own toolchain for scenes, data collection and evaluation.

Do I need simulation myself as a company?

Not always. It pays off mainly with many variants, with costly or unsafe errors on the real robot, or when the robot is not yet available. For a simple task with little variation, working with real demonstrations is often faster.

Plan a demo

Plan a demoQuote