← Back to portfolio

Autonomous Catching Robot

Solo Project · In Development

CAD render of the gray autonomous catching robot, with a blue rim, black and silver phone cameras, and three omni wheels.
CAD assembly: recessed stereo cameras around a circular catching opening, with a three-wheel omni drive below.

The Autonomous Catching Robot is a robotic bin designed to intercept a thrown tennis ball. The intended system uses two stationary phone cameras and an iOS app to estimate where and when to intercept it, with a Raspberry Pi planning the bin's movement. I developed the software using a stereo testing and calibration rig, then designed the complete robot around a circular catching opening and a rear electronics bay. Testing so far covers camera capture on each phone separately, predictions from recorded throws, and planner simulations; the complete robot remains unbuilt, and live paired operation is unverified. The central constraint is predicting accurately enough, and early enough, to accelerate toward the target and stop before the ball arrives.

Catch Geometry

The bin opening defines the combined error budget for perception and motion. The current CAD has a nominal 380 mm (15 inch) circular mouth. A tennis ball approximately 67 mm in diameter leaves about 156 mm of clearance on either side when centered. That is a geometric upper bound: prediction error, stopping error, rim contact, and rebound must all be considered.

Vertical section through the gray robot, showing a charcoal catching liner above the chassis, a blue mouth rim, and electronics outside the catching cavity.
Section through the catching bowl and chassis. Only the mouth rim is highlighted in blue; the rear equipment bay stays outside the ball cavity.

Observing more of the flight can improve the trajectory estimate, but leaves less time for movement. For an ideal move that starts and ends at rest without reaching the speed limit, equal acceleration and braking split the movement window into two halves. Holding acceleration a constant, the ratio of reachable distances d for 300 ms and 400 ms is:

d300 msd400 ms=a(300 ms)24a(400 ms)24=(300 ms400 ms)2≈56%

Losing a quarter of the movement window nearly halves the available reach. I therefore prioritized acceleration and braking over top speed.

Camera Rig

Stereo vision recovers depth by comparing the ball's position in two calibrated camera views. This addresses a weakness of a single view: an approaching ball can travel substantially in depth with little displacement across the image. My early monocular fits produced smooth trajectories but incorrect landing times. To develop and calibrate the stereo software, I mounted an iPhone 11 Pro Max and iPhone 7 Plus on a printed bar, with the lenses approximately 6.7 inches apart. I already owned both phones, and separate calibration accounts for their different optics and capture resolutions.

Rear CAD render of the testing and calibration rig, with both phone cameras exposed.
Rear CAD view showing the phone seating and exposed camera modules.

Stereo depth depends on both camera spacing and relative orientation. A wider baseline improves depth sensitivity but enlarges the assembly, which was constrained by the printer bed. In an early recorded throw test, the landing prediction differed by roughly 28 inches in depth from the landing position reconstructed from the stereo footage. I initially attributed this to insufficient spacing, but a checkerboard recorded during the same session exposed a mismatch between the stored camera rotation and the mounted phones. Recalibrating their relative orientation resolved the depth error without widening the bar. This made repeatable phone seating a measurement requirement, not just a mounting convenience.

Full frame view of a recorded testing session, with the tennis ball high in the right half of the image and the two phones in their printed mount at the left. The checkerboard remains beside the rig and no person is visible.
Recorded throw test: the mounted phones and calibration checkerboard are at lower left, with the ball airborne above and to the right.

The optical configuration must remain repeatable too. Calibration and recording need the same capture mode because sensor cropping changes between modes. In a later session, an unfocused ball appeared as a blur halo, biasing its estimated center. I recaptured with focus locked and treated focus and exposure settings as part of the measurement setup, rather than attributing the resulting error to the trajectory model.

Integrating the Cameras

The complete robot places the phones at opposite rear corners, with the camera modules exposed above the rim and the bodies recessed into the walls. Integral printed guides hold the phones 42 degrees from vertical and locate them against bottom stops. The slots have nominal clearance of 0.15 mm per side and face, with lead-ins for insertion and an open center for cooling. Either phone can slide out for charging without removing any other parts. Seating force, cooling, and calibration repeatability still need checks with the printed parts and actual phones.

Local section of the current printed rear corner showing an iPhone seated directly in integral guides, with its camera module fully exposed.
Local section of the integral phone pocket. Blue marks the sectioned surfaces; the guides and bottom stop are part of the printed corner.

Ball Tracking

Each phone locates the ball in its own images using background subtraction and the tennis ball's color to limit processing cost. This assumes stationary cameras and restricts the current detector to tennis balls. A ball that rolled to a stop initially remained a false target because it differed from the original background. I made the background adaptive while waiting for a throw, then froze it during flight to preserve the moving ball.

The iOS simulator replaying recorded phone footage, with a green detection ring around the airborne tennis ball.
Detector replay in the iOS simulator, using recorded phone footage. The detected ball is marked in green.

Detecting the ball does not establish that it has been released. Including motion while it is still in the thrower's hand biases the estimated acceleration away from gravity. I check for a sequence consistent with ballistic flight after release before using the observations for prediction.

Capture & Timing

At 240 fps, observations arrive about 4.2 ms apart. This sets the detector's throughput budget, not the total capture to prediction latency. I tested sustained camera capture and detection on each physical phone separately while powered over USB. The older phone initially processed at half resolution, then heated up and began dropping frames. Further downsampling let both phones maintain 240 fps without drops during these tests, while the newer phone retained more image detail. I accepted lower spatial resolution for consistent sampling; the effect on live trajectory accuracy remains to be measured.

The two camera streams also need a common time reference. Pairing observations from different instants introduces an apparent depth error even with correct geometric calibration. The phones exchange candidate ball positions and timestamps rather than video, and one combines the observations for trajectory prediction. I implemented clock synchronization and stage timing logs to distinguish capture, processing, and communication delays.

Trajectory Prediction

The prediction must identify where and when the ball descends through the height of the bin rim. I triangulate synchronized camera observations into 3D positions, then fit initial position and velocity under gravity with a fixed drag term chosen for the tennis ball recordings. Extrapolating that trajectory gives the interception position and arrival time. Current recordings and configuration use floor contact; interception at the rim requires setting the corresponding height and transforming the prediction into the chassis coordinate system.

Illustrative trajectory fitted from the complete recording, with a simulated calculation delay. Playback is at one quarter speed; this is not a live prediction.

To evaluate how early predictions stabilize, I replay recorded throws with progressively longer observation windows. For each throw, I fit the complete trajectory to estimate a reference landing position and contact time, then compare predictions from the partial recordings against that reference. Scoring requires acceleration consistent with flight, low fit residuals (discrepancies between observations and the fitted path), and enough observations before the prediction cutoff.

At 400 ms before reference contact, 19 throws met these criteria; their predicted landing positions differed from the reference by a median of approximately 1.7 inches. This is an offline convergence result for selected tracks, not a detection success rate. It also does not establish independent landing accuracy: the partial and complete fits share recordings and a model, so calibration errors can affect both. Separate landing measurements are needed before comparing this result with the bin's clearance budget.

Drivetrain & Motion Control

The chassis uses three omni wheels arranged 120 degrees apart to translate without a steering maneuver. Eliminating that delay preserves more of the movement window, but omni rollers sacrifice traction compared with conventional rubber wheels. The motors hang below one aluminum chassis plate; the rear pair sit farther aft to support the electronics bay. Acceleration and braking under representative load must be measured before calculated reach can be treated as achievable.

Upright three-wheel drivetrain viewed obliquely from above, with the chassis plate omitted to expose the motors, aluminum hangers, and centered cable route.
Upright drivetrain in its installed arrangement. The chassis plate is omitted to expose the three motor and wheel modules and the cable route between the rear motors.

Each motor bolts to a short aluminum hanger that attaches directly to the chassis plate. A flanged hub connects the wheel to the gearbox's D-shaped shaft; a radial set screw retains the hub, and three through-bolts clamp the wheel to its flange. This separates the wheel connection from the motor mounting so either can be serviced without replacing the other. The gearbox bearings' capacity for the overhung wheel load still needs confirmation.

Exploded drive module showing a metal gearmotor, aluminum hanger and flanged hub, black nylon omni wheel, rubber rollers, and steel fasteners.
One drive module exploded along the shaft axis: gearmotor, aluminum hanger, flanged hub, and nylon wheel with rubber rollers. Selected fasteners show the two mounting interfaces.

The predicting phone sends the interception position and arrival time to the Pi, with acknowledgments to confirm receipt. While the cameras are stationary, the app can refine this target. Once motion is detected, I suppress further visual updates because the calibrated camera poses and background no longer apply. The Pi then follows the last target, and the app resumes tracking after the chassis settles.

The Pi planner converts the target into wheel speeds and an acceleration and braking profile, using encoder odometry to estimate position and velocity. To test this handoff, I connected the same Swift prediction core used by the app to the planner through replay of recorded detections. Repeating identical inputs isolates integration failures from variation between throws. This exposed dropped target messages when incoming bursts exceeded the planner's packet handling per cycle, which I corrected in the receive path.

In separate planner simulations, repeated target commands exposed a different failure: rebuilding each profile from rest repeatedly restarted acceleration and nearly stalled the simulated robot. I changed replanning to account for current velocity. Targets inside the stopping distance trigger braking first, preserving a physically feasible transition.

I wrote the wheel speed controllers for the Pi, avoiding a separate controller in the planned hardware. That choice depends on reliable encoder readings and control timing under load, with a microcontroller retained as a fallback.

Hardware & Construction

The mechanical design combines manufacturing processes to avoid printing a large, mostly empty enclosure. A rolled 1 mm 5052 aluminum skin forms the curved front and side returns. A 3 mm aluminum chassis plate carries the three geared motor and wheel assemblies. Printed rear corners integrate the phone guides and service-panel rails, while routed sheet parts locate the formed skin and bowl.

Inside, a formed PETG backing joins a separate PETG floor and supports a shaped closed-cell EVA liner. The bowl widens toward the circular mouth, and smooth transitions beside the phones guide the ball inward without a ledge underneath. The rear bay occupies the flat side of the D-shaped envelope, keeping electronics outside the catching cavity. The liner's rebound behavior and the shell joints still need prototype tests.

Exploded assembly with the rim, lined bowl, rear structure, and chassis aligned vertically; the front skin and rear cover move fore and aft, while the phones remain seated in the rear corners.
The rim, lined bowl, rear structure, and chassis separate vertically; the outer skin and rear cover separate fore and aft. Phones stay seated in their guides, and the liner stays with its backing and floor. Wiring and small fasteners are omitted for clarity.

Each printed rear corner combines the sidewall, phone guides, and rear service-panel rail. A separate upper cover closes the bay while leaving the phone withdrawal path open. The broad sidewalls use a continuous 2.4 mm skin, with thicker material at the screw seats and guides. Metal posts and battery brackets bear directly on the chassis plate; local standoffs support the separate bowl floor.

Inside view of the current printed rear corner and upper cover, separated to expose the continuous phone guides, sidewall, and rear-panel rail.
One printed rear corner separated from its upper cover to show the integral phone guides and service-panel rail. This view shows part relationships, rather than an installation sequence.

The Raspberry Pi, motor drivers, protection hardware, and both batteries share the rear service bay. A USB power bank supplies the Pi and logic; a separate 3S lithium-polymer pack supplies the motors. The phones use their own batteries. A single passive rear cover slides in fixed U-shaped guides and locks with a thumb screw. All electronics stay on the fixed structure, so opening the cover does not pull on a wiring harness.

Rear CAD render with the service cover raised, revealing batteries, Raspberry Pi, motor drivers, and wiring.
The passive cover slides upward, leaving the electronics, battery carriers, and wiring fixed to the rear structure.

The build sequence starts with one motor, driver, and wheel on a test rig, ballasted to its expected share of chassis weight. This lets me measure acceleration and braking on the actual floor before committing to the remaining drivetrain parts. Bench tests will also check encoder counts and control timing under processor load. A bench supply is sufficient for initial testing, but current limiting would make the measured acceleration a lower bound; those measurements must be repeated on the intended battery before setting the planner's motion limits.

Integration & Testing

Verification so far covers recorded camera data, planner simulations, and software replay. Live paired camera streaming and throws through the complete app remain unverified. Once the hardware is assembled, I will recalibrate the mounted cameras and verify the motor power cutoff and my communication watchdogs with the wheels raised. Tethered tests will then check the software travel boundaries before unrestricted movement, with speed increased gradually.

Stopping accuracy tests in several directions will establish how much of the clearance budget the assembled drivetrain consumes. Separate drop tests will check whether the liner retains the ball before attempting live catches. These tests return to the original catch constraints: arrive before the ball, stop within the shared error budget, and absorb the impact.

← Back to portfolio