Team11-Drona-Task2 / README.md
README.md
Raw

DRONA AVIATION: PLUTO DRONE SWARM CHALLENGE TASK 02

Overview

The world is evolving rapidly, and in this stride forward, “the sky is the limit”. A part in this evolution is being played by the advent of drones in various applications ranging from commercial deliveries to recreation. India is anticipated to be the world’s 3rd-largest drone market [Drone Industry Insights Report 2020], with a projected worldwide industry of $42.8 billion by 2025. This new emerging sector would attract new talent and investments.

Early exposure is the need of the hour to help build the talent needed to support this vision. With many complicated algorithms, software, and much time to set up your drone, Python programming language would be the right step towards an easy and accelerated learning curve and help the new entrants develop their solutions to real-world problems.

Drona Aviation is building an ecosystem to support this skill development through Pluto - India’s only developer drone platform supporting the Indian Nano-Drone. Drona Aviation is primarily based on 4 fundamental principles complementing one another.

The organization has worked hard to provide an open-source implementation with learning content. This serves as the basis for building upon their work, which is precisely what the company intends - helping young talents explore and incorporate their ideas.

The report is based on the team's journey while attempting the “Pluto Drone Swarm Challenge”.

Problem Statement

The second task utilizes this python wrapper to achieve two objectives - (i) Hover the drone at a particular position, specified to be close to 4 feet with some variations (ii) Move the drone in a rectangular motion, following a trajectory of predefined dimensions

The general framework to achieve these two objectives is provided. An ArUco Tag would be used to estimate the drone's position based on visual data from a USB web camera attached to the ceiling of the area where the drone is to be flown. Based on this feedback, a controller [Mentioned as a PID Controller] would be responsible for holding the drone on a trajectory.

Table of Contents

  1. Installation
  2. How To Run
  3. Code Structure
  4. Fail Safe Scripts
  5. Runs : Hovering and Path Tracking

Installation

This repository is built using Python 3.9.6 and tested on Ubuntu 22.04 LTS and Ubuntu 20.04 LTS environment. Follow these intructions

  1. Clone the repository

    git clone https://github.com/InterIITDrona-Team11/Team11-Task2-Drona.git
    
  2. Run the following command to install the required dependencies

    python3 -m pip install -r requirements.txt
    

How To Run

autoPluto.py is the main python script which defines the class and also calls it to run the drone accordingly in the hover or rectangle tracking mode.

  1. Connect to the Pluto Drone Wifi by entering the provided password.

  2. Navigate to the directory where repository is cloned

    cd Team11-task2-Drona
    

    To set the mode make appropriate changes in the mode attribute of droneData.ini file present in the controls directory.

  3. Run the script autoPluto.py to run the different parts of task 02.

    python autoPluto.py
    

Code Structure

Fail Safe Script

To ensure safety of the drone and the surrounding environment robust fail safe mechanism was implemented.

Two situations where fail safe scripts are triggered have been shown below -

  1. Occluding the ArUco marker for 3-4 seconds results in the drone landing safely. This can also be done using the hand of the user.

  1. When the drone moves out of the Field of View of the overhead camera for a pre-set time duration, the drone once again lands safely.

Runs : Hovering and Path Tracking

For the purpose of this task we show two cases -

  1. Hovering at around 1m height

The following metrics were used to ensure that our hovering was as close to ideal as possible -

X co-ordinate Vs Y co-ordinate Error in Z co-ordinate

The first plot [Left] shows the variation in x vs y, which clearly indicates that post take-off the drone tries to maintain the same x and y co-ordinates and stabilise at a particular target position. The second plot [Right] shows the varation of error along z-axis which stabilises as close to zero showing we have achieved our target state.

  1. Following a rectangle of dimensions [1m X 2m]

The following metrics were used to ensure that our path tracking was as close to ideal as possible -

Cross Track Error Error in Z co-ordinate

The first plot [Left] shows the cross track error, which shows how accurately the rectangle is being tracked. The oscillations are expected to some extent when flying tight trajectories indoors. The second plot [Right] shows the variation of error along z-axis which stabilises and indicates that the drone tries to maintain a fixed height while flying in the rectangular path.