TT Lab
Blog

한국어 English 日本語 中文

Get started
Blog

Blog

Until Hitting the Ball: Seven Steps from Perception to Motor Current and the Time Budget

Status: Draft (2026-10-18), Measured. The numbers in this post were calculated directly on a single laptop (Apple M1 Max, macOS 26.5) using Python 3.9.6 and numpy 2.0.2. Times are the median of 7 runs, with the first run discarded as a warm-up. Raw data and code are in the working directory measure/robot-arm-basics/(m01_budget.py, m01b_fast.py, out/m01_budget.json). None of the values were measured on actual robot hardware (unmeasured on hardware). The initial ball states used DeepMind's public dataset (CC-BY 4.0), and table tennis specifications were verified against the original ITTF Statutes 2026. All reference materials were accessed on 2026-10-18. Writing convention: Measured data is the default, unmeasured items are marked as "[Unmeasured]", and unverified items as "[Unverified]".

Table of Contents

1. Intuition: Seven Things That Must Be Done Within 0.6 Seconds

A human already starts turning their body the moment the ball leaves the opponent's racket. They track the ball with their eyes, guess where it will bounce, pull their arm back, and swing. All of this happens in less than a second, mostly without conscious awareness.

A robot must solve this process calculation by calculation. This series divides that calculation into seven steps.

Step Task Covered in
1. Perception Find the ball in camera images to get its 3D position Part 2 (Coordinate Transformation)
2. State Estimation Estimate position and velocity from noisy position sequences Part 6 (Kalman Filter)
3. Flight Prediction Calculate the ball's future path using gravity, drag, Magnus force, and bounce Part 6
4. Shot Selection Determine when and where to hit, racket speed, and face orientation Part 7
5. Inverse Kinematics Convert racket posture into joint angles Parts 3, 4, 5
6. Joint Trajectory Create a time function from current posture to hitting posture and speed Part 8
7. Low-level Control Actually follow the trajectory using motor currents Part 9

Part 10 compares what is solved via equations versus what is left to learning among these steps, along with table tennis robot papers.

This series is preparatory work to build an open-source hardware table tennis robot. Therefore, every single number is written to connect to "what parts should I buy." Examples include how many m/s the racket achieves given a certain joint speed limit (Part 5), how many cm the ball misses by if the racket angle is off by 1° (Part 7), and what breaks down if the control cycle is 200 Hz (Part 9).

2. Illustration: Seven Steps and Our Code's Calculation Time

공 하나를 치기까지: 일곱 단계와 우리 코드의 계산 시간 1 인지 카메라 → 공 픽셀 → 3차원 위치 125 fps 면 8 ms 마다 한 점 2 상태 추정 칼만 필터로 위치·속도 프레임당 125 µs 3 비행 예측 중력·항력·Magnus + 바운스 타격면까지 11 ms 4 타격 결정 나갈 속도 → 라켓 법선·속도 뉴턴법 14 ms, 닫힌 해 4 µs 5 역기구학 라켓 자세 → 관절각 해석해 58 µs 6 관절 궤적 지금 자세 → 타격 자세·속도 5차 계수 7 µs 7 저수준 제어 위치 루프 → 전류 루프 1 kHz / 30 kHz 시간: 파이썬 3.9·numpy, 노트북 CPU, 7회 반복 중앙값(첫 회 버림).
Figure: Seven steps and the calculation time taken for each step using this series' Python code

3. Calculation: How Soon Does the Ball Arrive?

The starting point of the time budget is the flight time of the ball. We prepared two things to measure it directly.

Initial state of the ball. Google DeepMind's public competitive_robot_table_tennis dataset contains 15,792 ball positions, velocities, and angular velocities immediatelyafter being hit by a human or robot (13,088 rallies, 2,704 serves). This data was used for training in the paper by D'Ambrosio et al. 2024 (arXiv:2408.03906) and is distributed under CC-BY 4.0. In the coordinate system, the center of the table top is the origin, x is width, y is length, and z is up. The entire series uses this same coordinate system. The robot stands on the y < 0 side.

Flight model. The equations of motion, covered in detail in Part 6, are integrated using RK4 at 1 ms intervals.

m · dv/dt = m·g  −  ½ ρ C_D A |v| v  +  ½ ρ A r C_M (ω × v)
            중력     항력(drag)          Magnus 힘
탁구대에 닿으면: 법선 속도에 반발 계수 e, 접선 방향은 쿨롱 마찰 μ

The code is short. It filters and launches only the balls coming toward the robot from the dataset, bounces them once on the robot's side of the table, and records the timestamps when they pass various "hitting planes".

incoming = [s for s in rallies + serves if s["vel_y"] < 0]      # 로봇(y<0) 쪽으로 오는 공 14,703개
for s in incoming:
    rec = fly(p, v, w, dt=1e-3, stop=lambda t, p, v, nb: p[1] < -2.2 or nb >= 2)
    # 첫 바운스가 로봇 쪽 탁구대 안이면 유효. 이후 y = -1.37, -1.6, -1.9 를 지나는 시각·높이·속력을 기록

The results are as follows: out of 14,703 balls, 11,590 landed properly on the robot's side of the table (the rest were nets or outs), and among those, 10,618 flew all the way to the end line (y = −1.37 m).

상대가 친 뒤 공이 로봇 끝줄을 지나기까지 0.30 0.45 0.60 0.75 0.90 1.05 1.20 0.02 0.04 0.06 0.08 상대 타구 뒤 시간(초) 비율 바운스 중앙 0.45s 끝줄 통과 중앙 0.65s 공 10,618개(DeepMind 초기 상태, CC-BY 4.0)를 우리 비행 모델로 날림. 5·95백분위: 0.47–0.95초. 막대는 0.025초 칸.
Figure: Distribution of time taken from opponent's shot until the ball passes the robot's end line
Event 5th Percentile Median 95th Percentile
Ball speed immediately after hit (m/s) 3.89 5.46 7.62
Spin immediately after hit (rad/s) 9 49 100
Until robot-side bounce (seconds) 0.317 0.449 0.621
From bounce to apex (seconds) 0.511 0.678 0.904
Apex height (above table, m) 0.20 0.30 0.45
Passing end line y = −1.37 (seconds) 0.474 0.654 0.951
Passing 23 cm behind end line, y = −1.6 (seconds) 0.538 0.745 1.082
Ball speed passing end line (m/s) 2.07 2.88 4.15
Height passing end line (above table, m) 0.06 0.24 0.38

The calculation time took 130 seconds to run all 14,703 balls, which is about 9 ms per ball.

For Faster Balls

The balls in this dataset are not fast. The appendix of the same paper classifies balls over 7 m/s as "fast," while the 95th percentile in the table above is 7.6 m/s. As the skill level increases, balls become faster, so we calculated this separately. We simulated hitting a ball from 45 cm above the opponent's end line in the −y direction with speed v and top spin of 50 rad/s, and adjusted the vertical speeds using bisection so that it landed at y = −0.7 m on the robot's side (m01b_fast.py). All five cases clear the net.

Hit speed (m/s) Until bounce (seconds) Passing end line (seconds)
6 0.452 0.682
8 0.338 0.496
12 0.226 0.321
16 0.170 0.238
20 0.136 0.190

Büchler et al. (2022) report that their pneumatic muscle robot hit balls at an average of about 12 m/s in smash tasks (arXiv:2006.05935 v1). To receive a ball of that speed, the budget is 0.32 seconds—half of the dataset median.

4. Breaking Down the Time Step by Step

Let's break down the 0.65 seconds by step. It is important to note that these do not happen sequentially, but overlap. While watching the ball, the arm is already moving into a ready position, and predictions are refined with every new incoming frame.

Interval Time Taken Basis
Ball tracking time 0.1–0.3 s Part 6 measurement: Predicting after watching only the first 0.1 s yields a median hitting plane position error of 7.0 cm (drag model), whereas watching for 0.3 s yields 4.8 cm
Camera frame 8 ms (125 fps) Camera setup in D'Ambrosio et al. 2023 (arXiv:2309.03315)
System latency Ball observation 40 ms, arm action 71 ms Same paper Table I (average). The 2024 paper summarizes it as "system latency approx. 100 ms"
Our calculation (prediction + shot selection + IK + trajectory) Approx. 25 ms Sum of measurements per part: 11 + 14 + 0.06 + 0.007 ms
Time for arm to reach hitting posture 0.05–0.10 s Part 8 measurement: Quintic trajectory passing 0.6 rad and reaching 10 rad/s, acceleration limit 300–600 rad/s² taking 0.062–0.082 s
Remaining margin Remainder About 0.2 s based on dataset median of 0.65 s; almost none for a 12 m/s ball (0.32 s)

Two things are apparent from the table.

  1. Calculation time is not the bottleneck. Even with educational Python, it is 25 ms. The bottlenecks are the fact that the prediction accuracy improves only when watching the ball long enough, and the latency accumulating in cameras, communication, and controllers. Google's system had an observation latency alone of 40 ms.
  2. Viewing time and movement time trade off against each other. The longer you watch, the better the prediction, but the less time the arm has to move. Therefore, actual systems send the arm to a rough ready position even when predictions are crude, and adjust the target as predictions are refined (trajectory replanning in Part 8).

5. Common Models and Constants of This Series

All parts use the same constants. Values confirmed by opening the original texts and assumptions are distinguished and noted.

Quantity Value Source and Conditions
Ball mass and diameter 2.7 g, 40 mm ITTF Statutes 2026, 2.3.1 and 2.3.2
Table tennis table 2.74 × 1.525 m, height 76 cm Same document 2.1.1
Net height 15.25 cm Same document 2.2.3
Table restitution e = 0.876 Value converted without air resistance from "drops to about 23 cm when dropped from 30 cm" in 2.1.3. Covered again in Part 6
Table friction μ = 0.25 Dynamic friction measurement by Nakashima et al. 2010
Drag coefficient C_D = 0.47 Matched to effective value 0.471 measured in the same project's MuJoCo simulator. Literature range 0.37–0.55 (Sony AI 2026 Table I)
Magnus coefficient C_M = 0.6 (3.4×10⁻³ per mass) Value carried over from Tebbe et al. 2020 in simulator notes (original text unverified). Varies by over 3x across literature (Part 6)
Racket restitution e_r = 0.8 Between literature values 0.788 (Koç et al. 2018) and 0.81 (Nakashima et al. 2010)

The coordinate system, mass, diameter, and table specifications match the MuJoCo table tennis simulator being developed in the same project. Since the simulator took the DeepMind dataset laptop's MJCF as its starting point, the ball states in this post can be directly plugged in to cross-verify results.

6. Limitations

7. Summary

Titi's Note. During the 0.6 seconds the ball is coming, the robot performs seven tasks. Calculations finish quickly, but the real dilemma is that the longer you watch the ball, the less time you have to move your arm!

References

All materials were accessed on October 18, 2026.

Sign in to like

Comments

No comments yet.

Sign in to leave a comment