Survey and Rescue: A project funded by Eyantra, IIT B and MHRD
Background:
EYRC, a national Robotics competition organized by yantra which is a joint initiative by IIT Bombay and MHRD. The students in this competition learn to build and program a robot and in this competition, there are certain challenges that student needs to accomplish to win. For more information you can check this link: https://www.e-yantra.org/
Introduction:
For thousands of years, humans have been using land and water to navigate the terrain. Air travel has regular revolutionized many facets of life. One of the main advantages of airways is that we can have a bird eye view thus very helpful for surveying operation. Aerial robots like you UAVs are used for this purpose. Recently in western India flood, 2019 drones and quadcopters were used for serving, providing essential items like food medicine to the affected. In our project, we will try to mimic the situation to control our drone autonomously. We will be learning the control system image processing and algorithm development in our way.
Keywords:
Robot operating system (ROS), PID, Control System, Algorithm, Gazebo- Rescue drone: Pluto X drone quadcopter, for localisation we are using whycon markers.
- The Arena: it is a hypothetical representation of flooded region. Blocks represent houses, white region is submerged area. Arena is printed on 8X8 feet flex and the black region is 6X6 inches.
- LED Module: are placed on various cell these are controlled by arduino Nano microcontroller.
-
Beacons: are car indicator of distress or immediate rescue.
- Red Light-Rescue
- Blue Light- Medicine
- Green Light- Flood
Flight Controlling with PID:
PID stands for proportional integral derivative is an algorithm widely used in control system. It is used when we are not able to model the system exactly. At crux it uses error value calculated by the difference of current position to set points then a correction value is calculated to reduce this error. To know more please check this explanation:
Tuning PID for drone:
As you know the system is not mathematically modelled hence we are using PID. PID requires three
parameter to be configured that is KP, KI and KD. as the PID algorithm is used for controlling throttle,
pitch, roll, or simply (x,y,z). We need to tune 9 parameters in total. There are different method to tune
PID like regular Ziegler-Nicholas, hit and trial, etc. Here in our project we are using a combination of
hit and trial and Ziegler-Nicholas method. Here is the code you can refer for the values:
We first tune the throttle value then pitch and then yaw. Tuning values is iterative process. Tuning
values on simulator is not difficult but on hardware it was especially difficult because a wrong tune
value can lead to crash or damage of the hardware. One good way was to tie a string to the drone. One of
my friend hold tdrone through string while other tuned the drone.
ROI Detection:
With the help of open CV we applied image processing algorithm to find the region of interest. As you can
see in the image the blocks were required to be detected in order to serve them in the condition of the
distress.
Please refer to the code for ROI detection. It can be simply illustrated as following steps:
- Gaussian Bluring
- Countour Detection
- Area Calculation
- Selecting Areas of suitable small boxes
Beacon Detection:
For Detection for Beacons, LED lights, of different colors we used hsv values calculated by OpenCV.
- HSV values for red color:
lower_red = np.array([140,105,210]) # lower limit of hsv for red led detection.
upper_red = np.array([255,255,255]) # upper limit of hsv for red led detection.
- HSV values for Blue Color:
lower_blue = np.array([100,150,150])# lower limit of hsv for blue led detection.
upper_blue = np.array([130,255,255])# upper limit of hsv for blue led detection.
- HSV values for Green Color:
lower_green = np.array([52,25,212])# lower limit of hsv for green led detection.
upper_green = np.array([80,255,255])# upper limit of hsv for green led detection.
Path Planing Algorithm:
It was the most difficult part to design the path planing algorithm. Please refer to this code, which is well documented, to explain the code https://github.com/akansh12/Survey_and_Rescue/blob/main/scripts/scheduler.py
Results:
Credits:
- Akansh Maurya
- Ayush Mishra
- Koustubh Jaiswal
- Aditiya Shaurya