Completed

Summary

Built a Bitcraze Crazyflie 2.1 navigation pipeline that transferred from Webots simulation to hardware flight. In simulation, the drone used OpenCV-based gate detection and triangulation; on hardware, it executed waypoint-based trajectory control through known gate poses. The main engineering focus was robust trajectory generation for reliable autonomous laps through spatial gates.

  • Repository: GitHub
  • Environment: Webots Simulation & Real Hardware (Bitcraze Crazyflie 2.1)
  • Objective: Navigate 2 full laps through 4 spatially placed gates
  • Libraries: crazyflie-lib-python, OpenCV, Webots API
  • Team: Advaith Sriram, Federico Rocca, Teo Halevi, Yugo Kadowaki, Nevò Mirzai

Simulation Phase

Implemented a randomized 3D gate course in Webots. The drone’s onboard camera captured images of the environment, and gates were detected using a color-based segmentation + contour detection pipeline.

  • Triangulation was used to compute gate position from edge and center points
  • Navigation was done by computing entry and exit vectors, rather than passing through the center, to improve robustness
  • Multiple laps were executed, with the first lap for detection and mapping, and subsequent laps optimized for speed


Gate setup for simulation project

Hardware Implementation

After successful simulation tests, the codebase was adapted to work with the Crazyflie 2.1 drone:

  • Interfaced with the drone via the crazyflie-lib-python library
  • Flight commands were executed in real-time from a ground station
  • Navigation setpoints were set with entry/exit points rather than gate centers for improved robustness


Gate setup and strategy for hardware testing

Demo Video

Hardware demo: Crazyflie navigating a gate sequence

Tools and Libraries

  • crazyflie-lib-python for controlling the drone in hardware mode
  • Webots for drone simulation and simulation world setup
  • OpenCV for gate detection using color segmentation and contour filtering
  • Python for all integration, logic, and visual processing scripts

Key Takeaways

  • Gate detection via entry/exit vectors significantly improved robustness compared to center-only targeting
  • Adapted the navigation stack from simulation to real-world Crazyflie hardware execution