Skip to content

sytan98/Rover-Path-Planning-Brainhack2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rover-Path-Planning-Brainhack2020

This was WASD++'s attempt for the finals of the DSTA BrainHack 2020 which we came in second place for.

Contributors: Daryl Lee, Ming Chong, Alvin, Wei Xiong, Kang Liang and Si Yu (me!)

Purpose

We are given a Tello API drone and a DJI Robomaster EP rover. The objective was to use the drone to fly and capture a bird's eye view of the arena and to plot out a path for the rover. The arena has routes that are black in colour which the rover is allowed to travel on and has obstacles littered around the arena. Thus, we will need to process the picture taken by the drone and plan a path from the start point to the end point that avoids the obstacles.

How it works

Main

main.py There are several components involved in this project. We have the drone component as well as the rover component and this script ties everything together. Running this will launch the following actions:

  1. Initiate the drone to start flying and to take the picture.
  2. Run through the frames taken and look for a frame that AWS Rekognition is able to identify both the letter "S" and "E" which stands for the start and end position for the rover.
  3. Run through the A Star algorithm to plot a path
  4. Send commands to Rover to travel to end point.

Drone

drone.py This contains the drone object which upon initialising it, we can use a .fly() function for the drone to take off and it will take a few shots once it has reached a certain height. It allows for a switch to manual mode in the event that the autonomous mode does not work. It uses the Tello_API provided by DSTA to send commands to the Tello Drone.

Robo

robo.py This contains the robo object which has been designed to allow quick adjustments to the attributes for tuning of the robo on the real arena itself.

  1. Find S and E in the image. We tried using some OCR models such as using tesseract ocr, but the results were poor compared to using AWS Rekognition. So we went for it and will require boto3 client to be set up before running the script. Do some image processing to mask everything except the white portions (The edges of the roads on the arena) and change it to a gray scale image before sending it to AWS.
  2. Get obstacles by masking out everything except the areas that are not the colours of the cones(obstacles). Iterate through pixels and append them to a list of points that we will input into our A star algorithm as obstacles. Colour the grid black as well as cover S and E with a black box.
  3. Get Path

Potential Improvements (Not Fully Implemented)

  1. Auto Aligning of frames taken by drone based on a reference image.

About

Rover Path Planning for BrainHack 2020 by DSTA

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages