Closing the Sim-to-Real Loop: Adapting Simulation Randomization with Real World Experience

Yevgen Chebotar, Ankur Handa, Viktor Makoviychuk, Miles Macklin, Jan Issac, Nathan D. Ratliff, Dieter Fox

TL;DR

Transferring robotic skills from simulation to the real world often fails because simulators can't perfectly replicate reality—a challenge known as the "reality gap." This paper introduces SimOpt, a method that automatically tunes simulation parameters (like friction or mass) by using a handful of real-world trials to ensure the robot's behavior in simulation matches its behavior in the real world.

What Problem Does This Paper Address?

Reinforcement Learning (RL) is data-hungry. While we can generate millions of trials in a simulator, policies trained in "perfect" virtual environments often fail when deployed on physical hardware. To fix this, researchers use Domain Randomization (DR)—training the robot on a wide range of simulated physics (e.g., varying gravity or surface friction) so it learns to be robust.

However, DR has a "Goldilocks" problem:

  1. Too narrow: The robot doesn't learn enough variety to handle the real world.
  2. Too wide: The robot becomes overly conservative (trying to solve for impossible physics) or the simulation itself becomes unstable and crashes.
  3. Manual Tuning: Finding the "just right" distribution of parameters currently requires tedious, expert-level manual tweaking.

Methods

The authors propose SimOpt, an iterative framework that "closes the loop" between simulation and reality.

  1. Policy Training: Train a control policy in simulation using a starting distribution of physics parameters (using Proximal Policy Optimization, or PPO).
  2. Real-World Roll-out: Run the learned policy on a physical robot and record the trajectory (joint angles and object positions).
  3. Discrepancy Measurement: Run the same policy in simulation across various physics settings. Compare these simulated trajectories to the real-world data using a weighted $L_1/L_2$ loss function.
  4. Distribution Update: Use a gradient-free optimizer (Relative Entropy Policy Search, or REPS) to update the simulation's parameter distribution. It shifts the "mean" physics of the simulator to better match the real-world observations while using a KL-divergence constraint to ensure the distribution doesn't change too drastically in one step.
  5. Repeat: Re-train the policy in the newly "tuned" simulator.

Datasets

As a robotics paper, the "datasets" are the physical and simulated environments used for evaluation:

  • Swing-peg-in-hole: A 7-DoF ABB Yumi robot must swing a peg attached to a flexible rope into a hole. This involves complex, non-rigid dynamics.
  • Cabinet drawer opening: A 7-DoF Franka Panda arm must grasp a handle and pull a drawer open, requiring precise contact physics.
  • Simulation Engine: The authors used NVIDIA Flex, a GPU-based physics engine, which allowed them to run thousands of parallel simulations simultaneously.

Key Insights and Ideas

  • Behavior Matching vs. System ID: Traditional "System Identification" tries to measure exact physical properties (like the exact diameter of a rope). SimOpt instead focuses on behavior matching—it doesn't matter if the simulated rope's "mass" is physically "correct" as long as the simulated peg swings the same way the real one does.
  • The Danger of "Too Much" Randomization: The authors found that training on an extremely wide distribution of parameters often leads to failure. Some randomized settings are physically impossible to solve, which confuses the learning agent and results in a "lazy" or overly cautious policy.
  • Data Efficiency: Closing the gap doesn't require thousands of real-world trials. For the swing-peg task, the system achieved high success with just three real-world iterations.

Key Results

  • Swing-peg-in-hole: After just two SimOpt iterations, the policy achieved a 90% success rate on the real robot. Without SimOpt (using only initial randomization), the robot consistently missed the hole.
  • Drawer Opening: SimOpt successfully adapted to real-world cabinet positions that were offset by as much as 22cm from the initial simulation. Standard domain randomization failed to produce a policy that could even reach the handle at these distances.
  • Speed: By leveraging a multi-GPU cluster, the RL training phase took only 7 to 22 minutes per iteration, making the "loop" fast enough for practical research.

Limitations and Future Work

  • Uni-modal Distributions: The current implementation assumes simulation parameters follow a Gaussian (single-peak) distribution. If the real world has multi-modal characteristics (e.g., a surface that is either very slippery or very sticky with nothing in between), this model might struggle.
  • State Estimation: The method relies on object tracking (using DART) to measure trajectories. Future work aims to integrate raw sensor data like vision (pixels) or tactile feedback directly into the loop.
  • Task Complexity: While impressive, the tasks are still relatively short-horizon. Applying this to long-sequence manufacturing or home robotics tasks remains a challenge.

Summary updated

BibTeX
@inproceedings{chebotar2019closing,
  author = {Yevgen Chebotar and Ankur Handa and Viktor Makoviychuk and Miles Macklin and Jan Issac and Nathan D. Ratliff and Dieter Fox},
  title = {{Closing the Sim-to-Real Loop: Adapting Simulation Randomization with Real World Experience}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2019},
  url = {https://openreview.net/forum?id=qfFfpVb64-b},
}
Figure