Narcan Delivery Drone
August 20259 min read
- ROS 2
- UAV
- Path Planning
- Gazebo
- PX4

Eight months as software lead on Purdue’s Narcan delivery drone, a team of nursing, biomedical, mechanical, and software students. Software covered everything from launch command to the drone sitting beside the patient.
- Autonomy pipeline in ROS 2: one stereo depth camera feeds the RRT* route planner and the final land-or-abort call.
- Precision landing: RANSAC lets the points vote on a ground plane, then the code scores slope, bumpiness, and size. One run cleared 37.44 m² of usable ground.
- Simulation first: Gazebo worlds plus the PX4 firmware that flies the real drone.
- Coverage model: a fleet at 60 mph more than doubles Indiana’s 5-minute household coverage from 37.44% to 78.65%.
An overdose gives you six minutes, so we designed the drone that shows up in five.
I led the software team on Purdue’s Narcan delivery drone, a Vertically Integrated Projects group that ran January to August 2025. Software owned everything between “launch command” and “drone sitting safely on a stranger’s lawn.” A fleet of these drones would more than double the share of Indiana households reachable in 5 minutes. Purdue’s engineering college wrote about the team in 2024.
Why a drone
In an opioid overdose, the problem is time.
- The window. Narcan reverses an overdose, but permanent brain damage starts around six minutes.
- The response. Ambulances average 7 minutes nationally and 17+ minutes in rural Indiana.
- The scale. The US lost nearly 114,000 people to overdose in 2023 and another 87,000 in 2024.
Narcan itself is cheap, safe, and simple enough for a bystander to use. Delivery is the bottleneck. A phone charger reaches a doorstep in two hours, but medicine cannot reach a dying person in six minutes. That mismatch bothered me enough to give it eight months.
The mission handed us three requirements:
- Reach the patient within 5 minutes over a 5-mile radius (5 miles in 5 minutes is 60 mph).
- Land itself in an unprepared area: backyard, parking lot, ballfield.
- Walk an untrained bystander through giving the medicine before the ambulance arrives.
My role
- Built the software pipeline in ROS 2, from camera input through Narcan drop-off.
- Implemented the route planner, an RRT* algorithm, and tuned it across speeds and terrain.
- Wrote the landing decision code that reads the ground and makes the final land-or-abort call.
- Set up the simulation world the whole stack was tested in.
- Co-modeled ambulance coverage across Indiana to put a number on whether the drone is worth building.
The autonomy pipeline
Everything starts with a stereo depth camera, two lenses side by side that measure distance the way our two eyes do. It hands the code a point cloud, thousands of little distance measurements. One branch of the software uses that cloud to get the drone there without hitting anything. The other reads the ground below and hunts for a safe spot. Both feed one final call. Land or abort.
Route-finding was the first big decision. The three classic planners, in plain terms:
| Planner | How it thinks | The catch |
|---|---|---|
| A* | Checks a map square by square, like a chessboard. | Needs the world chopped into squares first. Ours is a messy 3D scatter of points. |
| RRT | Flings branches out at random until one touches the goal. | Fast, but the first route it finds is jagged. |
| RRT* | Same, but keeps rewiring its branches into shorter, smoother routes. | Costs more computing per step. |
I picked RRT*. The extra compute is worth it when the drone draws the route live from whatever the camera sees.
Simulation first
Crashing a real drone with medicine on board is an expensive way to find bugs. We validated the flights in simulation instead. The setup is essentially a video game the flight code cannot distinguish from reality:
- Gazebo renders the physics-accurate world, with terrain I modeled in Blender.
- PX4 Autopilot, the real flight firmware, flies inside that world unmodified.
- ROS 2 is the nervous system carrying camera data to my code and commands back out.
- QGroundControl plays mission control on a laptop.
The same code runs in sim and on hardware, which is the whole point. The custom worlds exist to stress-test the landing code:
Precision landing
GPS gets the drone to the right address. The last ten meters are the actual problem, because nobody prepared a helipad next to the patient. From the point cloud over the ground below, the code has to pick a spot the way a picky camper picks a tent site. Flat, clear, and big enough.
- Guess a flat ground plane 400 times and keep whichever guess the most points agree with. The algorithm is called RANSAC. Think of it as letting the points vote.
- Points hugging that plane are trustworthy ground.
- Points sticking out get flagged as obstacles.
- Score the spot on slope, bumpiness, and size, then decide. The drone does not get a second opinion.
A representative run:
| Check | Reading |
|---|---|
| Slope | 0.334°, flatter than most driveways |
| Bumpiness | 0.014 m of bump between the ground and the flat plane, about a centimeter and a half |
| Usable area | 37.44 m², roughly a two-car garage |
| Points in agreement | 3,744 |
| Decision | LAND |
The 3D analysis then flattens into a top-down view, like the elevation shading on a hiking map. The pipeline circles its final pick on that view.
Impact
Hardware demos are easy to dismiss as stunts, so we scored every ambulance station in Indiana on how many households it could reach within 5 minutes:
- Ambulance network alone: 37.44% of households
- With a cooperative drone fleet at 60 mph: up to 78.65%
That 60 mph target is highway speed in a straight line over the cornfields. It drove the build team through 40+ simulated motor and propeller combinations. The real drone has hit 45 mph in flight tests. The simulations promise 74. Simulated propellers are reliably faster than real ones. Closing the 15 mph gap to 60 is the open problem.
Speed was only half the test. The first human trial at Purdue’s Alexander Field dropped real bystanders into a staged, high-stress overdose scenario. Over half could not administer the Narcan within the 30-second goal, which is all the 6-minute window leaves after 5 minutes of flight and 30 seconds of dispatch. Panic eats instructions. The interface went back for three redesigns that ask less of a frightened helper, plus an ethics-board proposal for the next round of trials.
What’s next
- 4G onboard, letting a 911 dispatcher launch and track a drone the same way they dispatch an ambulance.
- Route planning fast enough to replan mid-flight on the drone’s own small computer.
- A simpler 2D version of the landing check, because onboard computers have no processing power to spare.
The Ultimate Takeaway
A drone that lands itself is a neat demo. A fleet that doubles how much of Indiana gets Narcan in five minutes becomes a public health argument. Making that argument took both the landing math and the spreadsheet. An overdose gives you six minutes. We designed the drone that shows up in five.