PingPongRobot

A robot to play table tennis. Conceived, designed, built, programmed, tested, by me.

high Performance robotics

at home. Custom

I started this project with the idea of a robot that could play table tennis. The idea began with a birthday gift of a ping pong table, and an absence of other large projects.

The high level idea was this:

A very lightweight paddle would be actuated via a set of cables in a parallel-actuated system, allowing for very fast movement.

Code would be run on an external computer, communicating with an external microcontroller, and thus controlling the motors and thus the paddle.

This project in its entirety is executed by me. Design philosophy included high performance at low cost. The way the project turned out, every single subsystem of the robot is custom.

  • High speed cable-actuated motion

  • 7 axis parallel kinematics

  • 85 m/s² accelerations

  • 100% custom

  • 1200W

Architecture

Where does one start?

The robot is designed to run on an external laptop hosting the main scripts for the robot, in CPP, though usage of ROS was considered (and in hindsight preferred).

The architecture was split into 3 subsystems:

Kinematics

The kinematics feature a frame surrounding the table, with the actuated paddle strung by cables on pulleys. By precisely moving the pulleys in tandem, the paddle can be accurately moved through the cables alone, resulting in very low actuated-mass. This lends itself to very high speeds and accuracy without expensive actuators. In conjunction with an intelligent motion-pather, very quick reaction speeds are achieved, taking full advantage of the capabilities of the motion-system

Vision

The system for tracking the ball in 3d space is executed by 3 cameras. Due to the very high cost of professional robotics cameras, very cheap USB cameras were utilized. Taking advantage of large high-framerate streams, the noise and spatial imprecision can be overcome with the avalanche of data and a smart algorithm.

A large amount of data input and some innovation can easily overcome the shortcomings of affordable USB cameras comparable to high-end capture systems for this application.

Player

The intelligence behind the robot is, as of now, rudimentary. By interpreting data from the vision subsystem, ball flight paths can be analyzed for optimal play and return paths.

A promising approach is to train a neural net off of a model of the player constructed by analyzing multiple games. Training of the robot can be preformed against this opponent-model, tailoring the robot for active and reactive intelligent play.

Due to time constraints, as of now the player consists of


Subsystems

Kinematics

Motors, Controllers, and movement.

From Hardware to Motion:

  • Hardware

    • Motors and Drivers

    • Controllers and Communications

    • Proof Of Concept

  • Assembly

    • Frame and pulleys; Wiring

    • Calibration

  • Inverse Kinematics and Computations

  • Showcase

Vision

Datastreams to vision

  • Detection

    • Cameras; Calibration

    • Ping-Pong Balls in Milliseconds

  • Analysis

    • Kalman filter and Integration

    • probability/error aware tracking



cameras, detection, and data.

Player

The subsystem responsible for intelligent play is as of now incomplete and rudimentary.

A simple system is currently in place that applies a heuristic the predicted flight path extrapolated from the kalman filter estimated state to determine the point at which to hit the ball. The angle and speed are then calculated for a target shot to the center of the table, of the many possible return paths one with the lowest probability of failure is chosen via another heuristic over a sample of return shot parameters and the estimated state distribution.

The motion target is continuously updated as the flight state is better estimated, while maintaining the heuristic’s convergence. To maintain proper paddle contact velocity the paddle sweeps through a maximal probability volume through the predicted target state distribution to minimize the impact of temporal variation on contact.

If I had had more time to develop this area of the robot, I had envisioned the use of neural nets for truly intelligent learned play.

The robot player model would be trained in a simulated version of the actual system to pick up as much detail on the physics and workings of the system as a whole.

A pre-training step would be run to familiarize the model with the physics of the system and basics of hitting and returning the ball. A second model could then be built and trained upon a real human player by tracking the ball and the player’s tendencies (both a first order and second order approximation collection — base return position probabilities and/or reactions), which then could be used to further train the robots model, either as a perfect opponent or a mentor.

This is all speculative and much out of the scope of the project’s reasonability and achievability, yet this was provided as an outline to the potential of this subsystem.