Skip to content

Jash-Shah/Eklavya---Drone

Repository files navigation

Project

Building a drone and developing its control system.

Table of Contents

About The Project

Drone aviation is an emerging industry. With possibilities for its applications in agriculture, healthcare, e-commerce as well as traffic control. We wanted to get first hand experience with how a drone is designed as well as how it flies to get a firm grasp on the principles needed to work with drones in the future.
Our full project report can be found here

Tech Stack

File Structure

📦Eklavya---Drone
 ┣ 📂assets                           #contains gifs, videos and images of the results
 ┣ 📂cfg                              #config files for the sensors
 ┣ 📂include                          #include files for the plugins
 ┃ ┗ 📂vitarana_drone
 ┃ ┃ ┣ 📜gazebo_edrone_propulsion.h   #propulsion plugin include
 ┃ ┃ ┣ 📜gazebo_ros_gps.h             #gps plugin include
 ┣ 📂launch                           #launch files
 ┃ ┗ 📜drone.launch
 ┣ 📂models                           #files and meshes used to render the model
 ┃ ┗ 📂edrone
 ┃ ┃ ┣ 📂materials
 ┃ ┃ ┣ 📂meshes
 ┃ ┃ ┣ 📜model.config
 ┃ ┃ ┗ 📜model.sdf
 ┣ 📂msg                              #contains custom messages which are used to control drone functions
 ┣ 📂scripts                          #python programs used to run the drone
 ┃ ┣ 📂__pycache__
 ┃ ┣ 📜control.py                     #brain of the drone, this file needs to be executed
 ┃ ┣ 📜pid.py                         #contains the math needed to stabilise the drone
 ┣ 📂src                              #contains custom plugins used with the drone
 ┃ ┣ 📜gazebo_edrone_propulsion.cpp
 ┃ ┗ 📜gazebo_ros_gps.cpp
 ┣ 📂worlds                           #world files
 ┃ ┣ 📜drone.world
 ┣ 📜CMakeLists.txt
 ┣ 📜README.md
 ┗ 📜package.xml

Getting Started

Prerequisites and installlation

  • Tested on Ubuntu 20.04
  • ROS Noetic
  • Gazebo Sim
  • Do visit these websites for the installation steps of the above mentioned software. It is recommended to install Gazebo along with ROS and not seperately

Installation

git clone https://github.com/Jash-Shah/Eklavya---Drone.git

Add this folder in the src directory of your catkin workspace Create the src folder if it doesn't already exist by

mkdir src

Initialise the project with

catkin_make
source ~/catkin_ws/devel/setup.bash

Execution

Open two terminal windows and run the following commands

  • Terminal 1
source ~/catkin_ws/devel/setup.bash
roslaunch drone vitarana_drone drone.launch
  • Terminal 2
source ~/catkin_ws/devel/setup.bash
rosrun vitarana_drone control.py

Algorithm Flowchart

Simplified code structure

Results and Demo

Drone at start of the program:

Drone when target co-ordinates are given in control.py:

final_pid_test.mp4

Future Work

  • Create a control system for the drone using PID
  • Stabilise the Roll, Pitch and Yaw of the Drone
  • Get the drone to fly at any arbitrary altitude
  • Have the drone fly to given co-ordinates and stabilise itself
  • Implement obstacle avoidance

Contributors

Acknowledgements and Resources

License

MIT License

About

Developing a Drone from scratch in ROS Gazebo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published