By Alina Abidi
Kuka watched the path of the ping pong ball, lifted a bright red paddle and, with a snap, effortlessly sent the ball to the other side. The class full of Stanford students laughed and cheered, snapping pictures on their phones. A final project for CS 225A: “Experimental Robotics,” Kuka succeeded in another return, and the four students who had programmed Kuka succeeded in their project: teaching a robot to play ping pong.
“The ping pong project was indeed very challenging since it combined vision, manipulation and required fast real-time responses,” said CS 225A lecturer Samir Menon. “Robots also lack the human ability to jerk their wrists and provide a ball with sufficient momentum. So returns were not easy.”
The robot’s name comes from its model, the KUKA Intelligent Industrial Work Assistant (IIWA). Though another KUKA Robotics robot has gained popularity for its ping pong skills in the past, the videos turned out to be heavily edited.
Project member Travis Le ’16 said that he was surprised when different news outlets, including Yahoo and Wired, picked up on the ping pong story since he was so impressed by other projects created by his classmates.
The class project was fairly open-ended, and other groups programmed the Stanford Artificial Intelligence (AI) Laboratory’s robots to do tasks such as playing kendama and serving as a moving landing pad for drones.
While brainstorming different functions for their robot, Le and his teammates looked at whip motions. When their professor noted that the snap of a whip was similar to the motion of playing ping pong, the students had their project.
The team’s main goals included intercepting the ball, seeing the ball, watching its movement, calculating where the ball would land and attaching the paddle to the robot. A secondary goal was figuring out how to hit the ball. Aside from a few bugs, the group felt their project went smoothly.
“[Our team] meshed really well,” Le said. “This was my favorite group project because of the people.”
Le explained that the team’s diversity allowed them to play to each other’s abilities. As the team’s only computer science (CS) major, Le did more of the coding, while others worked on the paddle attachment and trajectory calculations. According to class TA Wanxi Liu M.S. ’15, having a mix of majors — CS, mechanical engineering, aeronautics, etc. — made for the ideal group.
While the group dynamic worked well, Le explained that the group’s biggest challenge was just getting time in the AI lab, where the robots were stored. With all the different projects, there was a space constraint, and they needed to spend time with the robot.
“It might look easy, but it’s actually really hard,” Liu said. “There [are] a lot of constraints. They need to prevent [their robots] from hitting something [because] the robot is really expensive.”
Le also explained that, compared to other CS classes he has taken, CS 225A has been the most hands-on.
“[The class was] hands-on not only in the sense of doing work that really interests you, but also dealing with applications,” Le said. “Teaching a robot how to play ping pong, a lot of people can relate to. Whereas if you say, ‘My algorithm is two times faster than something else’ — that’s not as tangible.”
Le said he was nervous before the day of the final presentation, which was worth 50 percent of their grade in the class. Only one of his teammates, aeronautics graduate student Sarah Nelson, was able to “toss [the ball] well enough” for the robot to consistently hit it back. But on June 4, the robot even returned tosses from their classmates and professor.
“We didn’t really change that much code,” Le said. “It just worked. That was pretty beautiful.”
Contact Alina Abidi at alinafabidi ‘at’ gmail.com.