Autonomous Pool-Playing Robot
A simulated KUKA iiwa arm plans and plays single pool shots, choosing the ball and pocket with the widest margin for error and tracking a five-stage cue trajectory with inverse dynamics control. It sank its chosen ball in all 10 randomized trials with five object balls, and the project won an Outstanding Project award.
Pool asks for precise cue control and some strategy: a good shot depends on the direction and speed of the strike as well as on which ball and pocket you choose. For 6.4212 Robotic Manipulation, my teammate and I focused on a single shot. Given a table with randomly placed balls, the robot picks a target ball and pocket, lines up the cue, and sinks the ball.

I built the simulation environment. A shortened cue is welded to the last link of a KUKA iiwa arm, using the arm model without collision geometry to keep the simulation cheap. The cue tip uses a compliant hydroelastic contact model with an estimate of leather’s stiffness, and the balls and table use rigid hydroelastic contact with published pool physics constants. The pocketed table was the hardest part. Drake cannot subtract geometries, so I modeled a regulation 7 ft table in CAD, but the course’s convex decomposition script was too aggressive and left low-resolution, inaccurate pockets. I rebuilt the collision geometry from primitives instead.

Following Nierhoff et al., the planner ranks shots by allowed angular deviation, the range of strike directions that still pockets the target ball without touching a cushion. For every ball–pocket pair, it intersects the angles that send the target ball into the pocket with those that clear the cushion corners, then removes angles that would hit another ball, using tangent lines between ball pairs. It projects the remaining range back to cue-ball directions, keeps only directions where the cue ball actually reaches the target ball, and removes those blocked on the cue ball’s own path. Pairs that require too sharp a cut are ruled out early. The robot then aims at the middle of the widest remaining range.

The cue tip follows five stages: line up behind the cue ball, pause to settle, strike at 7/5 of the ball’s radius and follow through by one ball diameter, pause again, and lift clear of the rolling balls. We interpolated the end-effector poses with first-order holds for position and quaternion slerp for orientation, solved inverse kinematics at each keyframe, and tracked the result with an inverse dynamics controller.

In 10 trials with five randomly placed balls, the robot sank its selected ball every time. The ball occasionally rattled off the cushion beside the pocket before dropping. Since the arm tracked its keyframes, we traced this to a small error in the angle calculation. The scope was deliberately narrow: direct shots only with no banks, a cue ball placed within the arm’s reach, no collision constraints on the arm itself, and a cue ball that kept rolling longer than it should. Deepnote’s memory limit also capped the table at five balls. Next steps would be perception to read the table between shots, planning the cue ball’s resting position for the next shot, and a mobile base or second arm to reach the whole table.