Muhammad Ahmed

Intro to Robotics · Final Project · Fall 2025
KinoVaPong — Beer Pong Robot Arm
Robot arm beer pong player

KinoVaPong — Beer Pong with a Kinova Gen3 Lite

Together with my teammates, I built an autonomous beer pong system using a Kinova Gen3 Lite arm, a 2F gripper, and an Intel RealSense camera. The robot picks up a ping-pong ball from a fixed location, aligns itself to a red cup on a distant table using vision, and executes a fast throwing motion planned in ROS 2 and MoveIt 2.

ROS 2 · MoveIt 2 Kinova Gen3 Lite · 2F Gripper Angle-based Ball Release
Demo throw Final check-off

Project Overview

What KinoVaPong does

At a high level, KinoVaPong performs a full beer-pong throw autonomously. Starting from a home pose, the robot picks a ball from a designated pickup spot, lifts to a safe height, rotates toward the detected cup, and then swings its arm to launch the ball toward a fixed cup on a separate table.

I implemented the main ROS 2 control node, BeerPongThrow, which orchestrates this sequence and calls MoveIt 2 for motion planning on the Kinova Gen3 Lite. A separate vision node, RedCupAnglePublisher, computes the yaw angle of the red cup from the RealSense camera and passes it along so the base joint can be aligned before the throw.

Physical setup & human role
  • Kinova Gen3 Lite arm with 2F gripper mounted on a lab table.
  • A single red cup at a marked location on a “beer pong” table.
  • A ping-pong ball placed in a repeatable pickup position within the arm’s workspace.
  • A human operator starts the ROS 2 nodes, supervises each trial, and resets the ball and cup while staying outside the robot’s workspace.

System Design

Hardware, software, and behavior

Hardware

• Kinova Gen3 Lite 6-DOF arm
• Kinova 2F gripper for grasping the ball
• Intel RealSense RGB-D camera monitoring both tables
• Fixed tables with clearly marked pickup and cup positions

Software & nodes

• ROS 2 nodes BeerPongThrow and RedCupAnglePublisher
• MoveIt 2 motion planning with Kinova
• Planning scene with an attachable “ball” collision object
• Multi-threaded ROS 2 executor for concurrent sensing and control

Control logic

• Pick-lift-throw sequence in throw_ball_forward()
• Angle-based release monitor on joint_3 at 100 Hz
• Release signal when the joint crosses a target angle window
• Logging and simple error handling for camera and collision calls

Execution pipeline
  • Human places the ball and cup, then starts both ROS 2 nodes.
  • The vision node publishes the cup yaw angle on camera_start_angle_deg.
  • BeerPongThrow goes to a home pose, performs a pre-grasp, grasps the ball, and lifts to a safe height.
  • The base joint (joint_1) is set to the camera-derived yaw; joint_3 is moved to a large backswing and then swung forward while a timer monitors for the release angle.
  • Once the ball is released, the arm returns to home and waits for the next trial.
Conceptual data flow
Human setup → Start ROS 2 nodes → RealSense detects red cup and publishes yaw → BeerPongThrow plans pick & lift via MoveIt 2 → backswing → monitored swing with angle-based release → ball flight → robot returns home → human resets the ball.
Core technologies
ROS 2 rclcpp MoveIt 2 RealSense SDK C++ & Python

Control & Trajectory Details

How the throw is executed
Throwing motion & kinematics

The core throwing routine lives in throw_ball_forward(). After the ball is attached as a collision object, the arm transitions into a swing: joint_3 is driven from roughly −90° (backswing) to +90° (follow-through) while other joints maintain a configuration that points the gripper toward the cup.

Instead of stopping at a specific pose, the release uses a 100 Hz timer that continuously reads joint_3. When the joint enters a small window around a chosen release angle (for example −45°), a RELEASE signal is published so the ball is let go in the middle of a smooth, high-speed swing.

Concurrency, challenges, and extensions

The node runs under a multi-threaded ROS 2 executor, and the swing itself is launched in a separate thread. This lets joint state updates, camera callbacks, and timers run without blocking the main throw sequence. Early versions of the project struggled with inconsistent release timing until we reorganized callbacks and timers to avoid blocking behavior.

In future iterations, I’d like to add a more detailed ballistics model and predict the landing point before executing, as well as automatically optimizing release angles and joint speed profiles for arbitrary cup positions.

Experiments & Results

How well it worked

To evaluate KinoVaPong, we ran repeated trials with the cup at a fixed distance and systematically adjusted backswing, swing range, and release angle. The RealSense-derived yaw estimate allowed the arm to stay aligned with the cup across trials, so most of the tuning effort focused on vertical angle and joint velocity.

Example trial set (fill in your numbers)
Experiment Cup Distance Shots Hit Rate
Measurements 35cm 1 & 6 100%

The table is a placeholder so the page doesn’t get cluttered. We can update it with the actual trial counts and hit rates from our final experiments.

Key observations
  • Small changes to release angle or velocity scaling had a big impact on where the ball landed.
  • Parameter sweeps were essential for moving from “lucky shots” to a repeatable and convincing demo.