Back to Writing
RoboticsSimulationMathFRC

Shooting on The Move: Projectile Precision for Robots

Getting a robot to shoot balls accurately into a goal is a difficult engineering challenge. Getting a robot to shoot balls accurately while moving is even more difficult: velocity vectors add, and everything breaks.

Shooting on the move is a common problem in high school robotics competitions like the FIRST Robotics Competition, due to the numerous strategic advantages that it grants, and the required combination of physical understanding and practical algorithmic problem solving.

With some clever code and high-school physics, we can create an accurate model to both simulate and create robot controller code that functions reliably.

The Problem

There are many different kinds of goals that we may want to shoot projectiles into, but for our case, we’ll consider the simple flat, elevated, circular goal. Projectiles must enter from the top, and we’ll aim at the center.

Shooting Simulation Diagram
Figure 1: Diagram of projectile motion entering a hub target.

One example is from this year’s FRC game, Rebuilt 2026. Robots must shoot large quantities of high-density foam balls into a cone called the hub.

Projectile Physics

Let’s start with the simplest case. The robot isn’t moving, and is 5 meters away from the 2 meter high goal. How do we know what shot to take? How do we know at what velocity, and at what angle, to take the shot at?

High school projectile physics is very useful here. We’ll only consider the 2 dimensional case here, with yaw set so that the shooter is pointing directly at the target. Yaw deviations from target will be important later when we have to compensate for robot velocity.

Let us consider the exit velocity v and angle θ from horizontal. We can then define our velocity vector by its components:

v_x = v cos(θ)v_y = v sin(θ)

And then from kinematics, we can write our positions as a function of time t, given that gravitational acceleration is -g.

x(t) = v cos(θ) Δty(t) = v sin(θ) Δt - ½g(Δt)²

Then by eliminating Δt by substitution, we can transform kinematics into geometry:

x / (v cosθ) = Δty(x) = v sinθ (x / v cosθ) - ½ g(x / v cosθ)²

Note: This article is a work in progress. Further analysis on moving reference frames and code implementation will be added soon.