I, Foosball Player

University of Waterloo students develop "medium skilled" robotic defensive and offensive table-soccer players.

By André Voshart   |   April 07, 2009

Article Image

Keep up to date with the latest Canadian robotic and design news by subscribing to our bi-monthly newsletter.

When robots began doing menial jobs for us, who would have guessed they’d start playing our games for us, too? It turns out a group fourth-year electrical and computer-engineering students at the University of Waterloo did.

In January 2008, as their final-year project, the eight-man team constructed a robot-controlled, motor-and-actuator foosball table capable of playing against human opponents in a two-on-two fashion; one mechanical player controls two defensive rods (goalies and full-backs) and the other controls two offensive rods (half-backs and forwards).


Foosball table image gallery:
01  02  05  06 

07  08  09  10 

03  04

Watch video demonstration:
Foosball demo 


From there, they outlined two separate projects: Project Defence, which needed to implement detection, a brain and a control system for the two defensive rods. Project Offense was to implement an independent system for the offensive rods. Each team set off to design their projects independently, and the result was two fully functioning, collaborative computer players.

“Project Defense developed a system of lasers and photo detectors suspended just above the surface level of the table to detect the ball location using a grid,” explains Phillip Nadeau, who, along with Joseph De Filippis, Karmon Mah and Andy Zhang, was a member of the laser-grid team.

The second group, manned by Prateek Bhatnagar, Brandon Hayes, Mohammad Sharafat and Justin Groenestege, developed the offensive capabilities using a high-speed camera suspended above the table and an image-processing algorithm to detect the ball and rod positions in real time. The positions from both teams are then fed into their respective “brains,” a set of FPGA-based Altera DE-2 development boards. » Engineering details on next page


 

To help everything come together, sponsors provided necessary equipment: Myostat Motion Control provided eight CoolMuscle CM1-C-23L20 programmable servomotors (four for lateral movement and four for rotational movement), two 450W power supplies and eight network cards.

As well, Macron Dynamics provided four PSC28 linear actuators (used for the fast lateral motion of the rods), and Altera Corp. provided the development boards and a Terasic TRDB-D5M high-speed camera.

“We simply hooked up the RS-232 port of our Altera DE-2 boards directly to the back of the first motor, and hooked subsequent motors together in a daisy chain fashion,” Groenestege says. The motors were then controlled by composing simple ASCII-formatted character strings defined by the CoolMuscle language standard and sent serially over the RS-232 interface.

“The parts donated by Myostat and Macron Dynamics streamlined the mechanical design significantly to the point where the most challenging aspect of the project was by far the software development,” he says. Written in C++, the offensive and defensive algorithms were difficult, he says, because they needed to provide the system with hand-eye coordination.

“Human players can take hours to days to develop enough hand-eye coordination to play the game well,” Nadeau said. “Teaching the computer to play foosball, as you can imagine, is a lot more time consuming.”

To make the software design more manageable, the team split the table into regions and then decided on simple actions based on those regions. For example, if the ball were placed in front of the computer’s goal, the defense and goalie players would stagger themselves in front of ball to try and prevent the human player from scoring. If the ball rolls within kicking range, commands are sent to kick the ball forward or pass if necessary.

Overall, Nadeau said he would call the computers "medium skilled" players in that they were very competitive against beginners and fairly competitive against intermediates, blocking and returning many shots. “Despite this,” he admits, “anyone with a fast pull shot usually sneaks it past, so more improvements on the reaction-time front are definitely necessary before the computers are ready for the big leagues.”

After a year of software development and testing, the team and faculty consultant Sebastian Fischmeister demoed their bionic foosball superstars in January 2009 at the university's Senior Design Symposium to a positive reception.
foosball.uwaterloo.ca
www.coolmuscle.com


 


 

daily news