beacon autonomous drone user...

26
California University of Pennsylvania Department: Eberly College of Science and Technology Major: Computer Science Beacon Autonomous Drone User Manual CALU 2016

Upload: phambao

Post on 26-May-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

California University of Pennsylvania

Department: Eberly College of Science and Technology

Major: Computer Science

Beacon Autonomous Drone User

Manual

CALU 2016

i

Title: User’s Manual

Authors: Paul Hahn, Vincent Vitolo, John Derosa

Department: Eberly College of Science and Technology

Supervisor: Professor Jeffery Sumey, Eberly College of Science and Technology

Purpose: The purpose of this document is to instruct the user on the setup, op-

eration and modification of the Beacon Autonomous Drone (BAD) system. This

document contains step-by-step instructional guides to perform various opera-

tions for this system.

ii

Contents

Table of Contents 3

1 Beacon Autonomous Drone 3

1.1 About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2 Essential Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

2 Precautionary Information 4

2.1 Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.2 Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2.3 Additional Information . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Getting Started 6

3.1 First Flight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3.1.1 Start up procedure . . . . . . . . . . . . . . . . . . . . . . 6

4 Procedural Instructions 8

4.1 First Time Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4.1.1 Mission Planner . . . . . . . . . . . . . . . . . . . . . . . . 8

4.1.2 Pix-hawk . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4.1.3 Ground Control Unit Software . . . . . . . . . . . . . . . . 9

4.2 Flight Start Up Procedures . . . . . . . . . . . . . . . . . . . . . 10

4.2.1 Target Entry . . . . . . . . . . . . . . . . . . . . . . . . . 10

4.2.2 UAV Platform . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.2.3 Go Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.2.4 Intel Edison . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4.3 Flight Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

4.3.1 Debug Information . . . . . . . . . . . . . . . . . . . . . . 13

4.4 Automated Flight . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

4.4.1 Required Setup . . . . . . . . . . . . . . . . . . . . . . . . 13

1

4.4.2 Build a Mission . . . . . . . . . . . . . . . . . . . . . . . . 14

4.4.3 Adjusting Fail Safes and Safety Precautions . . . . . . . . 15

4.5 Image Collection . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

4.5.1 Retrieving Images From Go Pro . . . . . . . . . . . . . . . 15

4.6 Advanced Configurations . . . . . . . . . . . . . . . . . . . . . . . 17

4.6.1 Custom FTP Settings . . . . . . . . . . . . . . . . . . . . 17

4.6.2 Adjusting Camera Types . . . . . . . . . . . . . . . . . . . 18

4.7 Additional Information . . . . . . . . . . . . . . . . . . . . . . . . 18

4.7.1 Mission Planner . . . . . . . . . . . . . . . . . . . . . . . . 18

4.7.2 Intel Edison . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.7.3 Go Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

4.7.4 Pix-hawk . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5 Reference Information 20

5.1 Available HTTP Commands . . . . . . . . . . . . . . . . . . . . . 20

List of Figures 22

List of Abbreviations 23

2

1. Beacon Autonomous Drone

The Beacon Autonomous Drone is a project created to explore the development

capabilities related to autonomous flight and processing algorithms. This project

was carried out in an effort to produce an expandable solution that could possibly

be used for future endeavors.

1.1 About

The BAD project was developed for CSC 492 at California University of Penn-

sylvania, by Paul Hahn, Vincent Vitolo, and John Derosa as an attempt to create

an autonomous vehicle capable of recognizing targets given some basic informa-

tion with the use of a Pix-hawk Flight Control Unit (FCU) and Mission Planner

software.

1.2 Essential Features

Some essential features of the project include:

• Autonomous Flight: Pix-hawk Flight Controller and Mission Planner Soft-

ware

• Target Recognition: OpenCV Python Library and Go Pro Camera

• Simplistic User Interactions: Mission Planner Software and Developed In-

terfaces

This user manual will describe the various interactions required to control

some of these components, as well as some basic development information required

for expansion of this project.

3

2. Precautionary Information

This section describes some of the warnings and danger notices that are accom-

panied with this project.

2.1 Notes

It is important to note that due to recent popularity in unmanned aerial vehicles,

aerial vehicles must now be registered to the Federal Aviation Administration.

This means that anyone who is responsible for the control of this vehicle, au-

tonomous or not, is required to register this vehicle=, or could potentially face

significant amount of fines. This registration process can be carried out at:

https://www.faa.gov/uas/registration/.

2.2 Warning

This system is an autonomous system, so proper care must be taken to ensure

that all of the surrounding environments are safe and the area is controlled be-

fore flight. The autonomous flight portion of this project has been extensively

tested through the use of the open-source Mission Planner and Pix-hawk related

forums and user bases, but that does not mean the accidents can not happen, so

caution must be taken to ensure that all surround areas are safe in regard to the

autonomous vehicle flight path. The use of flight boundaries can also be used to

restrict flight to safe areas. This fact, in addition to the fail-safe options provide

a safe means to guide the unmanned aerial vehicle (UAV) in a safe manner, as

well as the option regain control in the event of an autonomous system failure.

4

2.3 Additional Information

The following links will provide additional resources and insight into current safety

protocols that should be followed in order to provide the best environments for a

safe flight.

Recreational Safety Guidelines:

http://knowbeforeyoufly.org/for-recreational-users/

5

3. Getting Started

This user manual will include a brief tutorial on basic system set up, start up,

and operation. Refer to this section to get acquainted with this systems order of

operations, as well as view a complete guide to walk through the typical operation

of this system.

3.1 First Flight

The first flight of the BAD project system requires some additional set up that

may not be required in later flights, this is due to the required calibration of

hardware components like the Global Positioning System (GPS), compass, Radio

transmitter, telemetry and electronic speed controllers (ESC). Refer to the initial

setup portion of this document to ensure that all of the required components are

prepared so your first flight goes smoothly.

Tips

• Be sure that all components are fully charged (Radio Transmitter, Go Pro,

GCU, etc.)

• A wind free environment is ideal

• Remove any trim on the radio transmitter, the trim will be handled by the

Pix-hawk

• Mission Planner will set its home position based on where the motors were

armed, so keep this in mind when setting up a mission.

3.1.1 Start up procedure

1. Execute Ground Control Unit Tasks

(a) Run b-a-d.bat

6

(b) Use target selection window to specify target

(c) Continue with mission parameters if needed with Mission Planner

2. Create and write a mission to the Pix-hawk using Mission Planner and

the Mission Planner documentation included in the procedural instructions

Mission Planner.

3. Place the UAV on a level surface and connect the battery. Do not move

the UAV until the Pix-hawk indicator light begins flashing red/blue, this

signifies that the gyroscopes have been initialized.

4. Arm the motors for flight by following the arming procedures in the proce-

dural instructions section.

• Proceed with caution, any radio transmitter input could cause the

UAV to respond.

• Once armed, the flight can begin manually or in auto mode. Continue

with steps to begin image capturing methods.

5. Connect the power supply connector from the main battery to the Intel

Edison

6. To fly manually you can simply control the UAV from this point as a normal

UAV.

7. If auto mode is needed, switch the Pix-hawk into auto mode by moving

the flight mode switch into the position you determined to be auto mode

during the initial setup procedures.

8. Once in auto mode, the UAV will execute all of the specified mission com-

mands. If at any point control must be regained, switch the flight

mode switch back into manual/stabilize mode.

7

4. Procedural Instructions

This section will provide step-by-step directions on how to assemble, set up and

operate the BAD system. These instructional guides are targeted for the compo-

nents developed for BAD system, but will also include brief information and links

to more detailed collections on the Mission Planner and Pix-hawk components

as well. Additional information related to these extra components can be found

through the addition information section.

4.1 First Time Setup

This section contains information related to the initial set up of the BAD system

components.

4.1.1 Mission Planner

Mission Planner is an open source application that provides utilities to follow

in-flight data, organize automated flight, as well as many other options. This

software can be downloaded from the ardu-pilot web page at:

http://ardupilot.org/copter/docs/common-install-mission-planner.

html

Visit the above web page and install the Mission Planner software according

to the Mission Planner documentation. Mission Planner supports both Linux

and Windows platforms, so be sure to choose the correct version according to

your system.

4.1.2 Pix-hawk

The Pix-hawk FCU requires the most initial set up; Due to its autonomous abil-

ities many parameters must be initialized before the first flight. Before flight

can begin the following procedures must be completed. These first time set up

8

procedures can be found on the Pix-hawk web page at the following URL address:

http://ardupilot.org/copter/docs/initial-setup.html

Follow the procedures listed on the linked URL web page to completely set

up the Pix-hawk firmware, Mission Planner specifics, as well as all information

relating the mandatory hardware configurations.

4.1.3 Ground Control Unit Software

1. Install Mission Planner

2. Download Beacon Autonomous Drone Package

3. Run b-a-d.bat

Installing Mission Planner

The ground control unit (GCU) software requires very little initial setup to exe-

cute. The only required set up is that the Mission Planner software is installed

according to the Mission Planner web page via the Mission Planner installation

guide:

http://ardupilot.org/copter/docs/common-install-mission-planner.

html

Install Beacon Autonomous Drone Package

The BAD system is an open-source repository hosted on GitHub, so this system

can easily be obtained by cloning the repository via git commands:

git clone https://github.com/Hahn814/BAD.git

On a windows based platform, this package can also be downloaded as a

compressed folder by visiting the repository and selecting ”download ZIP”.

9

Once downloaded, simply extract the package to a preferred directory and

follow the remaining steps.

Run Package

In addition to the Mission Planner software, the user must also have access to

the target collection application developed for this project. This application is

included in the package, so its only a matter of running the application when the

time comes.

Once the Mission Planner software has been downloaded,this system can be

ran by simply executing the b-a-d.bat execute batch file, which will start all

required software for the user.

4.2 Flight Start Up Procedures

The BAD system has a few procedures that should be completed before flight

execution begins. The following sections will discuss these procedures in some

detail.

4.2.1 Target Entry

The target entry application allows the user to specify what they want their

ground target to look like. The user can specify this, FTP parameters, and

camera types within this application window.

Notes

• Transparent background PNG images provide the fastest processing times

• Test any FTP parameters before upload to ensure that the image is received

correctly.

10

Procedure

1. Run b-a-d.bat

2. Move to the target collection window labeled B.A.D.

3. Make any required minor adjustments

(a) Adjust any FTP parameters as needed

(b) Adjust camera type

(c) Test FTP connections

4. Select target image by selecting the browse button and searching for the

target image you would like. (See notes for image type preferences)

5. once and image is selected, choose the add target button

6. Preview any images you would like to verify correctness

7. Select continue when you are ready to upload the image to the shared server.

8. Close application when successful output is received.

4.2.2 UAV Platform

The UAV platform will required the most start up interactions. These interac-

tions include the arming of the motors, pre-arm safety check, as well as multiple

advanced configurations and safety options are available. The UAV start up

procedure can be viewed in a more detail form on the Pix-hawk APM web page:

http://ardupilot.org/copter/docs/flying-arducopter.html

4.2.3 Go Pro

The Go Pro is controlled via HTTP commands, which means that the only pre-

requisite to flight for the Go Pro is to turn on the Go Pro’s independent wireless

networking signal. This can be done by doing the following procedure:

11

Enable Go Pro Network

1. Locate WiFi button on the side of Go Pro camera.

2. Press the button

3. The blue led light on the front of the camera will begin blinking when the

WiFi signal is active.

4.2.4 Intel Edison

The Intel Edison is a standalone system that requires nothing but power from

the UAV platform. Once powered the Intel Edison will begin initialization pro-

cedures. In addition to the initialization procedures, the Intel Edison’s other

functions will be completed in an automated fashion, requiring no user input.

4.3 Flight Data

If the user has chosen to use the telemetry data transmitter, they will have access

to in-flight data, including flight altitude, ground speed, GPS location, etc. In

order to ensure that the previous information is view able you can follow these

steps:

Telemetry Data

1. With Mission Planner, connect the Mission Planner software to the Teleme-

try COM port, as you normally would for a USB connection.

2. Once connected, you should now have full control over Pix-hawk parame-

ters, etc.

3. Simply select the Flight Data Tab located at the top left corner

4. The in-flight data will be visible via the dashboard on the left hand side of

the screen.

12

4.3.1 Debug Information

Debug information for the current flight is visible in the head up display (HUD)

on the Flight Data tab. This HUD will show any errors with pre-flight checks,

and data errors in red. Additional error message and logging can be performed

using the Mission Planner command line interface.

4.4 Automated Flight

In order to begin an automated flight, the user must first ensure that all of

the required parameters are set. Once the required parameters are collected by

Mission Planner, it is safe to build your first mission. This section will discuss

the full circle of creating and implementing a flight mission.

4.4.1 Required Setup

There are a few required components before a mission can be executed. These

required items are:

• GPS module for automated flight

• Flight modes are initialized

• Radio transmitter is calibrated

• Pre-flight safety checks all pass

The appropriate GPS modules, flight mode configurations, radio transmitter

calibration, and pre-flight safety checks are all described in depth on the APM

web page.

http://ardupilot.org/planner/docs/mission-planner-overview.html

13

4.4.2 Build a Mission

This project revolves around Mission Planner’s ability to construct an automated

mission of way-points, altitudes, speeds, etc. A basic flight mission can be con-

structed fairly easily with the use of Mission Planners Flight Planner functions.

The below list outlines the general order and format needed to construct a flight:

Build the Mission

1. Connect Pix-hawk via USB or telemetry transmitter

2. Once connected, select the Flight Plan tab near the top left hand side of

the window. Once the flight plan window is displayed, the user can add and

remove way-points and adjust way point parameters, such as loiter time, or

speed of ascent for example.

3. Once the user is happy with the mission plan, select the Write WPs button

to save the mission way-points to the Pix-hawk.

Execute the Mission

1. Arm the UAV motors

2. Wait for the GPS module to lock onto the location (LED lights will blink

red and blue)

3. Move the flight mode switch into the position chosen as the AUTO mode.

4. UAV should now begin auto flight.

5. If at anytime flight control needs to be regained, move the flight mode

position switch back into the MANUAL or STABILIZE mode.

Once again, these procedures are covered in a much more detailed way at the

APM web page.

14

4.4.3 Adjusting Fail Safes and Safety Precautions

Fail safes are what dictates what type of action the UAV will complete if any

unsafe conditions are met, such as low battery levels, loss of connection and

boundary exceptions. These pre-defined safety settings can be adjusted using the

section within Mission Planner’s initial setup tab.

Define Safety Precautions

1. Select the Initial Setup tab

2. Expand the Mandatory Setup Section

3. Select the FailSafe item to adjust available Fail Safes

4.5 Image Collection

Images at this time are not visible in real-time form, but they are available to

view after flight has completed, or even during flight by selecting the image files

you are interested in. This section will discuss how to collect the flight images

collected during flight.

4.5.1 Retrieving Images From Go Pro

The images captured during flight while using the Go Pro camera are stored

locally by the Intel Edison, as well as on the Go Pro independent Cherokee

web server. This section will discuss viewing the collected images from the Intel

Edison, due to the Cherokee servers ability to use Go Pro related applications to

simply view those images easily as is.

An alternative to the available Go Pro applications is to directly access the

Go Pro Cherokee server by visiting the appropriate address, or by using FTP

software to transfer and view files. The address that is typically assigned to the

15

Go Pro cameras is:

urlhttp://10.5.5.9:8080/videos/DCIM/

By visiting this address, the user will have access to the videos and images

captured by the Go Pro, and stored onto the Cherokee server. A typical visit to

this address may warrant a site similar to the below image (figure 4.1).

Figure 4.1: Go Pro Cherokee Server

Collecting Images from Intel Edison

The images that are stored on the Intel Edison are guaranteed to have been

processed and placed in their respectable folders. These images are available by

viewing the image folders files on the ground control unit (GCU) user interface,

under the collected images menu item. It is important to note that these files

will not be available until the flight is complete. Images will be collected based

on number of matched key points. Images with a large amount of matched key

points (likely target image) will be added to the hits directory, while images with

less than the necessary to be considered will be added to the img directory.

16

4.6 Advanced Configurations

The user has the ability to adjust some of the available parameters within this

project. These parameters can be adjusted to change the file transfer protocols

(FTP) settings used throughout execution, to adjust the type of camera being

used on this system, as well as various start-up procedure parameters adjustments

that are available.

4.6.1 Custom FTP Settings

The user has the opportunity to adjust FTP parameters that are used to transfer

files between the GCU and the Intel Edison. This can be easily done through the

GCU user interface (UI). The image below (figure 4.1) shows the available FTP

settings section available on the main user interface, the B.A.D. window.

Figure 4.2: Custom FTP settings windows

The user has the option to adjust the FTP specific login parameters, such as

user name, password and FTP server address.

17

4.6.2 Adjusting Camera Types

This system has also made an attempt to adapt to multiple camera types. One

available alternative to the Go Pro is a USB controlled camera, which can be

specified on the user interface main window. By selecting the camera type you

are using, the system will adapt to that input to provide similar results regardless

of camera type.

This can be done by selecting the camera type radio button that relates to

your available camera type from the area highlighted in the image below (figure

4.2).

Figure 4.3: Adjusting Camera Type

4.7 Additional Information

4.7.1 Mission Planner

Mission Planner is an enormous software application that can be used to control

many types of vehicles in an autonomous fashion. This document only scratches

the surface of the possibilities this system is capable of in combination with

Mission Planner software. If you are interested in researching the capabilities of

18

the Mission Planner software, or just mastering the procedures mentioned in this

user manual, visit the Mission Planner web page to view tutorials and mission

related information.

http://ardupilot.org/copter/docs/introduction.html

4.7.2 Intel Edison

The Intel Edison is an invaluable component of this system. The Intel Edison

provides much more processing power than other systems of the same size, which

makes it a very flexible and powerful hardware components. If you would like to

view any of the hardware specific details, or continue research into this component

visit the Intel web page for tutorials, hardware diagrams.

http://www.intel.com/content/www/us/en/do-it-yourself/edison.html

4.7.3 Go Pro

The Go Pro camera is a very powerful consumer level camera that has the ability

to communicate via HTTP commands. This functionality allows for a list of other

possible project ideas, as well as expansions that can be added to this existing

project. For further information on the Go Pro camera, and all of the available

applications and accessories visit:

http://gopro.com/

4.7.4 Pix-hawk

The Pix-hawk flight controller is a high level flight controller capable of many

autonomous functions, in addition to manual control. Visit the Pix-hawk web

page for all of the available information on this module:

https://pixhawk.org/modules/pixhawk

19

5. Reference Information

reference information, but only up to a certain point. For example, if there are

numerous commands, a separate book for commands is necessary. Reference

information in user guides is often presented in tables: columnar lists of settings,

descriptions, variables, parameters, flags, and so on.

5.1 Available HTTP Commands

The Go Pro camera is controlled using the Go Pro HTTP commands, also referred

to as bacpac commands by the Go Pro documentation. These various commands

were combined in a library to provide a way to communicate to the Go Pro in a

way that could provide any easy route to expand this software in the future. A

command consists of multiple items: the device, IP, application, command, and

password. These components are formed into a URL and requested via terminal

commands. When the commands are executed, the Go Pro will respond to the

request address with the specified action. The commands used within the current

system are listed below.

BACPAC COMMAND Actionstart capture Begin capture sequencestop capture Stop capture sequence

enable camera mode Set current mode for videoenable photo mode Set current mode for photos

get photo Retrieve most recent photo from Cherokee serverget image id Return the most recent image downloaded id string

Figure 5.1: Common BACPAC HTTP Commands

There are many more commands available in the existing system that are

capable of modifying configurations like resolutions, or adjusting shutter speeds

and time lapse photos. The above include commands are only the building blocks

needed to understand the current systems interactions with the Go Pro via HTTP

20

commands. For further information on these commands, view the source files of

the BAD system, the HTTP commands are defined within URLCommands.py

and used frequently within captureImage.py.

21

List of Figures

4.1 Go Pro Cherokee Server . . . . . . . . . . . . . . . . . . . . . . . 16

4.2 Custom FTP settings windows . . . . . . . . . . . . . . . . . . . . 17

4.3 Adjusting Camera Type . . . . . . . . . . . . . . . . . . . . . . . 18

5.1 Common BACPAC HTTP Commands . . . . . . . . . . . . . . . 20

22

List of Abbreviations

BAD Beacon Autonomous Drone

GCU Ground Control Unit

GPS Global Positioning System

ESC Electronic Speed Controller

FCU Flight Control Unit

HUD Heads Up Display

FTP File Transfer Protocol

GCU Ground Control Unit

UAV Unmanned Aerial Vehicle

UI User Interface

HTTP HyperText Transfer Protocol

URL Uniform Resource Locator

23