Sim2Real: The Challenge of Learning in Simulation and Transferring to Reality
Sim2Real is an approach in which robots and AI systems learn in simulated environments and apply that knowledge in the real world. But the gap between simulation and reality, known as the reality gap, remains a major obstacle. This article explains the challenge and the main approaches to overcoming it.
Why it matters
Sim2Real is an unavoidable challenge in putting robots and AI to practical use. If the gap can be overcome, robots could become a reality in factories, homes and disaster sites. Many technologies trained in simulation, including autonomous driving and drones, also face this problem. Understanding it provides a way to assess technological progress and follow future developments.
Explainer
## Introduction: Why Learn in Simulation?
Teaching a robot a new task through trial and error on real hardware takes time and money. For example, suppose you have a robot arm practice grasping an object 1,000 times. On real hardware, parts could break or safety risks could arise along the way. Sim2Real uses a virtual world created inside a computer so the robot can practice tens of thousands of times.
In simulation, nothing breaks when the robot fails, and time can be sped up. It is also easy to create situations that are unlikely to occur in reality, such as extreme cases involving the angle at which an object falls. This makes simulation an efficient way to train.
## What Is the Reality Gap?
However, even when a robot learns perfectly in simulation, transferring what it has learned to real hardware often does not work well. This is called the “reality gap.” The problem is that simulations cannot perfectly reproduce the real world.
For example, physics engines simplify calculations of friction and air resistance. Camera images also cannot perfectly mimic real-world noise and changes in lighting. Delays in robot motor responses and variations among individual parts are often ignored, too. As a result, movements that work in simulation may fail on real hardware because the robot slips or veers off course.
## Approach 1: Domain Randomization
One way to reduce the reality gap is “domain randomization.” This method trains a system while randomly changing simulation parameters such as friction, weight, color and lighting.
It is like practicing cycling not only on flat roads but also on gravel and hills. That way, you can handle roads in a range of conditions. Similarly, robots trained in diverse simulated environments become more robust to uncertainty in the real world.
## Approach 2: Domain Adaptation and Real-World Data
Another approach is to use data from real hardware to bridge the gap between simulation and reality.
“Domain adaptation” is a technique for making simulation images more like images from real hardware. For example, it can transform a virtual object created in simulation so that it looks as if it were captured by a real robot’s camera. This allows visual recognition learned in simulation to be used on real hardware.
Another method is to collect a small amount of data on real hardware and combine it with simulation training. For example, data from 100 movements on real hardware can be used to adjust the simulation’s physical parameters. This brings the simulation closer to reality and improves training.
## Conclusion: Adapt Rather Than Aim for Perfection
The essence of Sim2Real is not to make simulation and reality match perfectly, but to recognize the differences and enable robots to adapt to changes in the real world. Domain randomization and domain adaptation are powerful tools for doing so.
Even as simulation technology advances, the reality gap is unlikely to disappear completely. But if robots are designed with uncertainty in mind, they will be able to operate flexibly in the real world. This is much like how people gain experience and learn to handle a variety of situations.
Translated from the Japanese original: /news/explainer-sim2real-explained. The Japanese version is authoritative if they differ.