Optimal control meets table tennis (in simulation : )
No existing sim that models required frictional and aerodynamics effects?
Create your own!
Verify your simulation physics with real-life expereinces...
Left Image : Friction Effects - Ball with backspin returns back after table contact.
Right Image : Aaerodynamics Effects - Ball with forehand sidespin swerves left mid-air.
Desired properties I wished to enforce for the optimzer/policy -
1. Freedom in space AND time for racket contact
2. Freedom in space AND time for ball return position
For 2nd property, suitable objective functions shall suffice.
For 1st property, we need to pose as free-time problem.
Since ball's mass in negligible compared to that of racket+manipulator,
We can decouple the two optimizations for a more efficient approach.
Ball trajectory Optimization:
Given desired ball return pose and return time, solving for ball trajectory and racket strike time and orientation.
Desired return pose and return time are enforced as objectives (instead of constraints) to deal with levels of infeasibility,
and allow tradeoff between speed and accuracy (like in real life : )
Manipulator trajectory Optimization:
Tried using full 6DOF dynamics model, too slow.
Switched to generating a kinematic traj which is smooth and feasible.
(to be tracked by some tracking controller)
Solve for accelerations => 2nd order smooth trajectories.
Everything working together to bring beautiful natural strokes...
We can verify working of optimizer from real-life expereinces.
Left : When returning backspin, racket angle is appropriately opened up to compensate.
Right: When returning heavy topspin, racket angle is closed in to compensate appropriately.
Had to tune in parameters, try different libraries and formulations to find fastest possible setup.
Unfortunately, still not real-time deployable.
Ball trajectory optimizer takes ~3-4 seconds depending on conditions.
Manipulator tracjetory optimizer solves in under 0.2 seconds.
Final poster for the project -
Final paper for the project -