Optimal control meets table tennis (in simulation : )
Mastering high-speed, high-dexterity tasks remains a significant challenge in modern robotics. While humans can intuitively adjust to the spin and speed of a table tennis ball, replicating this agility in machines requires complex processing. This project explores how a 6-DOF manipulator can master these dynamics through optimal control. By solving the non-linear frictional and aerodynamic challenges inherent to a lightweight ball, this research advances the capabilities of robotic systems in dynamic environments—technology that is essential for the future of high-speed automated manufacturing and human-robot collaboration. The primary objective was to formulate a control problem that allows a manipulator to return an incoming ball to a precise location at a desired time.
To tackle the complexity of the system, I formulated the challenge as a trajectory optimization problem. Because the manipulator is roughly 1000 times heavier than the ball, momentum transfer is negligible, allowing for a decoupled design. I approached this in two distinct stages. First, I formulated the ball trajectory as a hybrid-system, free-time optimization problem. This predicts the ball's path over 64 timesteps, accounting for non-linear flight dynamics and contact physics to solve for the optimal racket strike velocity and position. Second, using the target racket pose derived from the first stage, I utilized a secondary optimizer to generate a kinematically feasible joint-angle trajectory for the 6-DOF arm.
To ensure the system could run efficiently, I benchmarked inference run-times across multiple solvers using identical initial conditions. The analysis revealed significant disparities in convergence speeds between low-resolution (64 timesteps) and high-resolution simulations. Specifically, the Python CasADI solver proved to be the most effective, vastly outperforming CyIpopt and Julia’s fmincon by achieving convergence in under a second for low-resolution tasks and under four seconds for high-resolution tasks. Beyond computational speed, I validated the physics engine by comparing the simulated flight swing and contact dynamics against real-life trajectory data. The simulation aligned closely with physical reality; notably, the robot's adjusted racket angles in response to spin shots mirrored the techniques used by human players.
This project successfully demonstrated that table tennis can be formulated as a free-time trajectory optimization problem that handles highly non-linear aerodynamic effects. My contribution established a framework that accurately predicts necessary strike conditions to return a ball to a specific target. Moving forward, the focus will shift to constraint analysis and hyperparameter tuning to reduce solving time to sub-milliseconds for real-time application, as well as expanding the scope to include strategic decision-making regarding return placement.