Drone Navigation - Rapidly-Exploring Random Tree
by BradyW22 in Circuits > Robots
165 Views, 1 Favorites, 0 Comments
Drone Navigation - Rapidly-Exploring Random Tree

This project implements a navigation algorithm known as a Rapidly-Exploring Random Tree (RRT) to navigate through an obstacle course
Supplies
Crazyflie 2.1 Drone
Jupyter Notebook
Overview

This project takes the theory of the RRT algorithm and implements it into a crazyflie drone to navigate a known obstacle course. While researching, I stumbled upon this paper by Steven M. Lavelle. He outlines the benefit of an RRT to be robust across many scenarios - holonomic & non-holonomic constraints and higher DoF systems. This allowed me to use the RRT to path-plan for a 6 DoF non-holonomic drone.
This story outlines the code for RRT creation, configuration space planning, and hardware implementation. A video at the end displays the drone's performance.
RRT Algorithm Setup and Helper Functions





These blocks are for the setup and helper functions of the main RRT algorithm. The blocks follow the photo sequence:
- Setup
- Configuration checking
- Edge checking
- Random configuration sampling
- Path creation
Main RRT Algorithm


The algorithm follows the sudo-code developed by Steven LaVelle in his paper.
The blocks follow the photo sequence:
- Main RRT algorithm
- Path creation through back tracking
Define Configuration Space

This creates a configuration space for the RRT navigation. The algorithm "knows" how the course will look by receiving measurements of the location and size of each obstacle in advance. The drone has a set boundary that determines the universal location. Although the RRT depicts the drone as a point, the obstacles are "inflated" to compensate for the drones volume.
Plot the Trajectory


After plotting the trajectory, the path should look something like the above. Sometimes a path isn't found due to the RRT's random nature. Just retry the block until a path is found.
Implement Into the Hardware
A file for the entire code file is provided below
Downloads
Results

The output should look similar to this:
Trajectory Setpoints
The final result video is embedded above.