TT Lab
Blog

한국어 English 日本語 中文

Get started
Blog

Blog

From Simulation to Reality: Domain Randomization, Delay and Noise Modeling, System Identification, and Massively Parallel Simulation

Status: Draft (2026-10-18), Measured. The numbers are simulation values directly calculated using Python 3.9.6 and numpy 2.0.2 on a laptop (Apple M1 Max, macOS 26.5). The "reality" in this article is another simulator with modified physical constants, not an actual robot (hardware not measured). Raw data and code: working directory measure/robot-arm-basics/rl/of ttenv.py, ppo.py, exp_rl.py(group sim2real), result out/rl/s2r_*_s{0,1,2}.json. References were accessed on 2026-10-18. Writing rules: Measured data is the default; unmeasured items are marked as "Unmeasured," and unverified items are marked as "Unverified."

Table of Contents

1. Intuition: Learning the Simulator's Flaws

Reinforcement learning policies find every loophole to increase reward (Episode 13). Inside the simulator, those loopholes include parts where the simulator is wrong. If the racket restitution is slightly stronger than in reality, the policy learns to hit gently to match that strong restitution. In reality, the ball hits the net.

As parts 1–10 showed, the physical constants of table tennis are uncertain. The literature's Magnus coefficients vary by over 7 times (Part 6), a difference of 0.05 in the restitution coefficient resulted in a 13 cm landing point difference (Part 7), and camera and controller delays ranged from tens to 100 ms (Part 1). There are roughly four ways to handle the problem of going from simulation to reality (sim-to-real, sim2real).

Method Concept Cost
Domain randomization Perturb constants every episode, learning a policy that works under any value It becomes a harder problem, requiring more learning
Delay and noise modeling Inject real system delays and noise into the simulator Must measure real delays
System identification (real2sim) Measure constants in reality and put them into the simulator Unmeasurable things (like spin effects) remain
Massively parallel simulation Computationally handle the increased learning volume from the above three GPU and CPU resources

2. What Actual Table Tennis Robots Did

3. Measurement: The "Reality" of the Pendulum Racket

3.1 Setup

The "reality" is a simulator with the following five changes. Each number was chosen to match the scale of uncertainty seen in parts 1–10.

Item Nominal Simulation "Reality" Basis
Racket restitution e_r 0.80 0.72 Same value as model error experiments in Part 10
Observation delay 0 20 ms (2 steps) Part 1: Real system delay is tens of ms
Ball position noise 0 σ 5 mm (velocity noise proportional thereto) Magnitude of correction and observation noise in Parts 2 and 6
Drag ×1.0 ×1.1 Part 6: Literature C_D 0.37–0.55
Magnus ×1.0 ×1.5 Part 6: Literature values vary by over 7x

There are four training distributions. All use direct control, shape reward, default PPO settings, 19,200 balls, and 3 seeds, and evaluations are performed on both nominal simulation and "reality" using 1,000 balls not used in training.

Training Distribution Restitution Delay (steps) Noise Drag Multiplier Magnus Multiplier
No randomization 0.80 0 0 1.0 1.0
Narrow randomization 0.75~0.85 0~1 0–3 mm 0.95~1.05 0.8~1.2
Wide randomization 0.65~0.90 0~3 0–8 mm 0.9~1.2 0.5~2.0
Identified values as-is 0.72 2 5 mm 1.1 1.5

Narrow randomization does not include"reality" (restitution 0.72 is out of range, delay of 2 steps is also out of range). Wide randomization includes it. The last row is the case where system identification succeeded perfectly.

3.2 Results

학습 분포를 넓히면: 명목 시뮬레이션 대 「실물」 0 25 50 75 100 % 83 73 랜덤화 없음 91 80 좁은 랜덤화 57 55 넓은 랜덤화 79 74 식별한 값 그대로 명목 시뮬레이션 「실물」(다른 물리) 「실물」= 반발 0.72·지연 20 ms·잡음 5 mm·항력 ×1.1·Magnus ×1.5. 시드 3개.
Figure: Nominal simulation and "reality" success rates by training distribution
Training Distribution Nominal Simulation "Reality" Median (Min–Max) Difference (Median)
No randomization 82.9% 72.7% (62.9~80.0) −10.2%p
Narrow randomization 91.2% 79.5% (70.8~85.2) -11.7%p
Wide randomization 57.4% 54.7% (52.6~75.4) -2.7%p
Identified values as-is 79.3% 74.4% (64.2~80.4) -4.9%p

3.3 What We Read

3.4 Ways to Change Observation

Randomization is a way of "withstanding what you do not know." There is also a way of "figuring out what you do not know." A separate MuJoCo simulator experiment in the same project reported that when a classical planner used prior knowledge of spin categories ("topspin, backspin, no-spin") and their average spin instead of estimating spin solely from the ball trajectory, return rates were 7–19%p higher depending on conditions (e.g., 77% → 94% when the decision point was 300 ms before impact and spin matched the dataset). Spin categories can be identified from pre-flight signals like the opponent's posture or hitting sound. D'Ambrosio et al. 2024 also noted the inability to accurately read heavy spin as a limitation, writing that opponents exploited that weakness (Section V, item 5). Expanding what the policy can see is sometimes cheaper than widening randomization.

4. Limitations

5. Conclusion

A Word from TT. Relying solely on the simulator causes balls to hit the net on a real table tennis table. Practicing while slightly perturbing physics helps you panic less on unfamiliar tables!

References

All materials were accessed on 2026-10-18.

Sign in to like

Comments

No comments yet.

Sign in to leave a comment