Drone Navigation - Rapidly-Exploring Random Tree

by BradyW22 in Circuits > Robots

124 Views, 1 Favorites, 0 Comments

Drone Navigation - Rapidly-Exploring Random Tree

Screenshot 2024-08-27 at 4.28.15 PM.png

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

Screenshot 2024-08-28 at 1.53.25 PM.png

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

Screenshot 2024-08-28 at 1.56.59 PM.png
Screenshot 2024-08-28 at 1.56.35 PM.png
Screenshot 2024-08-28 at 1.57.26 PM.png
Screenshot 2024-08-28 at 2.00.05 PM.png
Screenshot 2024-08-28 at 2.01.47 PM.png

These blocks are for the setup and helper functions of the main RRT algorithm. The blocks follow the photo sequence:

  1. Setup
  2. Configuration checking
  3. Edge checking
  4. Random configuration sampling
  5. Path creation

Main RRT Algorithm

Screenshot 2024-08-28 at 2.04.50 PM.png
Screenshot 2024-08-28 at 2.05.11 PM.png

The algorithm follows the sudo-code developed by Steven LaVelle in his paper.

The blocks follow the photo sequence:

  1. Main RRT algorithm
  2. Path creation through back tracking

Define Configuration Space

Screenshot 2024-08-28 at 2.08.06 PM.png

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

Screenshot 2024-08-28 at 2.09.11 PM.png
Screenshot 2024-08-28 at 2.09.42 PM.png

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

drone_RRT_navigation

The output should look similar to this:

Trajectory Setpoints

Trajectory Setpoints

The final result video is embedded above.