Sahil Aggarwal
← All projects
Aerial robotics · MEC 569

Crazyflie Autonomous Navigation

A fully autonomous mission for a palm-sized Crazyflie quadcopter: take off, cross an arena full of poles, find a landing pad it has never seen, land on its center, then fly back and land on the home pad. Built in Python as a state machine driven by three onboard sensors.

Course
MEC 569, Stony Brook
Team
Sahil Aggarwal, Isaac Lalicic, Benny Wen
Language
Python
Hardware
Crazyflie, Flow deck, Multi-ranger deck

Results from the successful run

Taken from the onboard event log of the final run.

2 / 2Pads landed on (target and home)
230 sFull mission time
4Obstacle encounters handled
~3 cmTouchdown from computed pad center (onboard estimate)
Top-down map of the successful run: green path out to the landing zone with a lawnmower search, red path back to the start pad, black dots marking laser hits on obstacles and walls, plus altitude and pad-detection plots over time
The successful run. Green: outbound leg across the obstacles and a lawnmower search of the landing zone. Red: the return trip, including a short re-search when the home pad was not exactly where it was entered. Black dots are multi-ranger laser hits.

Watch the run replay video →

The challenge

The arena has a start pad, a field of poles, and a raised landing pad somewhere in a known search region. The drone has no GPS and no camera image to work with. It must cross the obstacles, locate the pad, land on it, take off again, return through the obstacles, and land back on the home pad, all without a human touching the controls.

Strategy: three sensors, three jobs

Top view diagram: drone with a laser pointing at a pole 0.45 m ahead while the left, right and back lasers read clear
Multi-ranger deck. Measures distance to the nearest object up to about 4 m in each direction. Used to detect obstacles and steer around them.
Side view diagram: downward camera watching the patterned floor slide backward as the drone moves forward
Flow deck camera. Tracks how fast the floor texture moves under the drone to estimate x and y position. This is why the arena floor is patterned.
Side view diagram: down laser reads 0.30 m over the floor and 0.20 m over the pad, so a sudden 10 cm drop means the pad was reached
Flow deck down laser. Measures height to the surface below. Holds altitude, finds pad edges (a sudden 10 cm drop means the drone is over the pad) and confirms touchdown.

Mission state machine

The mission is broken into phases. Each phase has one job and hands off to the next, and an ABORT state can land the drone safely from any phase.

  1. TAKEOFF from the start pad.
  2. CROSS the arena toward the landing region, avoiding obstacles.
  3. SEARCH the landing region in a lawnmower sweep until the down laser sees a pad edge.
  4. CENTER by measuring the pad edges left/right, then up/down, and computing the center.
  5. LAND on the computed center, then reset the position estimate to the known pad center.
  6. TAKEOFF 2, RETURN through the obstacles, then SEARCH, CENTER and LAND on the home pad.

Obstacle avoidance

Tooling

Iterating through failed trials

Trial 1 map: flight path heading straight forward into the obstacle field, with altitude and pad-detection plots
Trial 1. The drone slid sideways only until the front laser cleared the pole, leaving no room for its own body, and clipped the pole. Fix: the safety bubble, pass step and extra margin.
Trial 2 map: flight path with lawnmower search loops and the pad-centering box, with altitude and pad-detection plots
Trial 2. Found the home pad, but the battery ran out mid-centering and it landed about 20 cm off. Fix: reset position to the measured pad center after each landing, move to the best center estimate on low battery, and use a fresh battery every run.

Intermediate trials surfaced three more issues, each with a targeted fix:

My contribution