Motivated by recent advances in robotic systems’ ability to interact with dynamic environments, we study autonomous robotic table tennis in this paper. We design a high speed robotic arm to play table tennis, and develop a software system that predicts the incoming ball’s trajectory and learns to control the robot arm for striking the ball to the opponent side of the table. Utilizing the idea of residual physics, we develop a residual predictor to predict a striking position for the incoming ball using sparse observation of the ball’s starting trajectory. We control the arm to the contact-ready position, and then use a neural network to output the striking velocity to hit the ball. The neural network is trained through experience using a regression-based learning method. Simulation results in a robotic simulator demonstrate the superior performance, benefiting from efficient learning.
Commercial robotic arms are designed for safe, limited-speed operation, making most of them unsuitable for table tennis. We therefore design a custom 6-DOF arm: joints J1–J4 use Xiaomi Cybergear motors (continuous rotation, up to 296 rpm, 12 N·m peak torque), while J5 and J6 use RDS5160 servos (0–270°, up to 461°/s, 6.87 N·m peak torque) placed along the paddle’s roll, pitch, and yaw axes for precise orientation control.
Given the first two camera-observed positions of a thrown ball, p0 and p1, the goal is to compute joint angular velocities that strike the ball so it lands at a desired location pL on the opponent’s side — with the striking point ps constrained to a fixed plane in front of the robot, and a pre-strike paddle orientation θd.
The system has three modules: a Striking Point Estimation module predicts where to intercept the ball, a Contact Ready module moves the paddle there, and a Ball Strike module predicts the joint velocities needed to hit it toward the desired landing spot.
From p0 and p1, an initial velocity v0 gives an ideal projectile-motion trajectory Pt. But real trajectories deviate from this ideal due to the table’s coefficient of restitution, friction, and air resistance — effects that are hard to model explicitly. Rather than modeling them, we learn the deviation δ directly: a shallow feedforward network (two linear layers, ReLU then TanH) takes p0, v0, the distance to the robot, and the ideal striking point pk, and predicts δ, so the actual striking point is ps = Pt + δ. The shallow architecture keeps inference to about 4.3 ms.
Once ps and the pre-strike orientation θd are known, an RRT-Connect motion planner computes the joint trajectory that brings the paddle from its current pose to the target pose, executed by the arm’s joint position controller.
With the paddle positioned at ps, the joint velocities ω4, ω5, ω6 (roll/pitch/yaw — sufficient to direct the ball anywhere) are predicted as a function of v0, ps, and the desired landing position pL. We model this mapping with a random forest regressor, trained on data collected by hitting the ball with random joint velocities and recording where it lands; a PID controller then executes the predicted velocities at the moment of contact.
Validated in a PyBullet simulation matching standard table tennis dimensions and ball properties (20 mm radius, 2.7 g), with a restitution coefficient of 0.75 and modeled table friction and air resistance.
Across 1000 thrown-ball trials, the residual predictor outperforms every baseline regressor tested on MSE, MAE, and R2 for estimating δ.
| Model | MSE (y) | MAE (y) | R² (y) | MSE (z) | MAE (z) | R² (z) |
|---|---|---|---|---|---|---|
| SVR | 0.0011 | 0.0274 | −4.29 | 0.0069 | 0.0683 | 0.775 |
| Decision Tree | 0.0004 | 0.0074 | −0.94 | 0.0069 | 0.0483 | 0.777 |
| Random Forest (20) | 0.00023 | 0.00688 | −0.05 | 0.00409 | 0.0387 | 0.869 |
| KNN | 0.0002 | 0.0061 | −0.33 | 0.0051 | 0.0475 | 0.835 |
| Ours | 0.0001 | 0.0053 | 0.199 | 0.0041 | 0.0346 | 0.888 |
The Y-axis R2 is comparatively modest, but the residual there is small in absolute terms next to the Z-axis residual — qualitatively, our model still reliably locates the collision point.
Among eight classical motion planners benchmarked over 1000 random target points, RRT-Connect had both the lowest mean planning time and the tightest interquartile range, motivating its use in the contact-ready module.
Repeating the striking-velocity experiment 1000 times with varied throw velocities and target landing positions, the Random Forest regressor with 160 estimators achieved the best R2 across all three rotation axes tested.
| Model | Roll | Pitch | Yaw | ||||||
|---|---|---|---|---|---|---|---|---|---|
| R² | MAE | MSE | R² | MAE | MSE | R² | MAE | MSE | |
| Decision Tree | 0.681 | 2.49 | 20.3 | 0.702 | 4.27 | 38.5 | 0.169 | 2.13 | 8.06 |
| KNN | 0.796 | 2.32 | 13.0 | 0.652 | 4.33 | 45.0 | 0.662 | 1.37 | 3.27 |
| SVR | 0.800 | 2.70 | 12.7 | 0.665 | 4.15 | 43.3 | 0.596 | 1.52 | 3.92 |
| Random Forest (160, ours) | 0.887 | 1.54 | 7.21 | 0.689 | 4.33 | 40.2 | 0.687 | 1.35 | 3.04 |
Across 1000 randomly thrown balls, the full system — residual predictor plus learned striking velocity — successfully intercepted 985, a 98.5% success rate. Without the residual predictor, relying on the physics-only trajectory alone, the system consistently failed to intercept the ball, since each bounce alters the trajectory in ways the ideal model cannot capture.
This work validates the approach entirely in a PyBullet simulation, assuming the first two ball positions come from an upstream perception system; a real robot experiment is beyond the current paper’s scope. Future work includes integrating a high-speed 3D perception system for real-time ball tracking on the physical arm, building a real-time control stack for low-latency contact-ready and strike execution, adapting the striking-point estimator to real sensor noise, and fine-tuning motion planning and control for the hardware’s constraints.
We presented a learning-from-demonstration approach to robotic table tennis built from three modules: striking point estimation, contact-ready motion, and ball striking. A residual learning scheme corrects a physics-based trajectory estimate using only the ball’s first two observed positions, and a random forest regressor learns the striking velocity needed to direct the ball to a target landing position. Compared to reinforcement-learning approaches that require extensive, potentially unsafe real-world trial-and-error, this sample-efficient formulation reaches 98.5% interception success in simulation while keeping both learned components fast enough — a few milliseconds each — for real-time play.
This paper is currently under review. If you’d like to reference it in the meantime:
@misc{chowdhury2025learningtostrike,
title = {Learning to Strike for Robotic Table Tennis},
author = {Chowdhury, Sakib and Guo, Yi},
note = {Submitted, under review},
year = {2025}
}