software requirement specification - …torrot.torrenglabs.com/documents/srs.pdfsoftware requirement...

13
SOFTWARE REQUIREMENT SPECIFICATION TORROT: MOBILE CONTROLLED PHYSICAL ROBOT GAME PROJECT ............................................................................................................................................ 1

Upload: trinhkiet

Post on 24-Mar-2018

218 views

Category:

Documents


2 download

TRANSCRIPT

SOFTWARE REQUIREMENT SPECIFICATION

TORROT: MOBILE CONTROLLED PHYSICALROBOT GAME PROJECT

............................................................................................................................................ 1

Table of Contents1. Introduction

1.1 Purpose

1.2 Scope

1.3 Existing Solutions

1.3.1 FreeFlight

1.4 Definitions, Abbreviations, Acronyms

1.5 References

1.6 Overview of Document

2. Overall Description of Project

2.1 Product Perspective

2.1.1 System Interfaces

2.1.2 User Interfaces

2.1.3 Hardware Interfaces

2.1.4 Software Interfaces

2.1.5 Communication Interfaces

2.1.6 Operation

2.2 Product Functions*

2.2.1 Input

2.2.2 Communication

2.2.3 Interaction with Environment

2.2.4 Score Table

2.3 Constraints

............................................................................................................................................ 2

2.4 Assumptions and Dependencies

3. Specific Requirements

3.1 Interface Requirements

3.2 Functional Requirements

3.2.1 Input

3.2.2 Communication

3.3.3 Interaction with Environment

3.3.4 Score Table

3.3 Nonfunctional Requirements

3.3.1 Performance Requirements

3.3.2 Design Constraints

4.Data Description

4.1 Data Objects

4.1.1 NavData

4.1.2 Video Data

5.Behavioural Model and Description

5.1 Description of Software Behaviour

5.2 State Transition Diagrams

6. Planning

6.1 Team Structure

7. Conclusion

............................................................................................................................................ 3

1. Introduction

1.1 PurposeThe following document’s aim is to explain all aspects of the Mobile Controlled Physical RobotGame project. It will contain information about the features and the user interface of the projectand how the end user will benefit from it.

1.2 ScopeThrough project, an application on Android platform is going to be coded, in the name of thesoftware to be produced. The application will communicate via bluetooth with a microcontrollerinstalled on a quadrotor. In this context, the application will send the user input to themicrocontroller, and receive information about the vehicle’s state from the microcontroller. Theapplication is a software that processes user input and manages the communication with thevehicle.

1.3 Existing Solutions

1.3.1 FreeFlightDeveloped and published by Parrot company, producers of the drone itself, FreeFlight allowsusers to connect and command AR.Drone 2.0. It is developed both for Google Android OperatingSystem and iOS. Users connect the drone via Wi­Fi connection, and control it with interfacebuttons provided and receive video stream from it.

This solution does not contribute the solution for the existing solution at hand as well as we planto do, because it does not provide any context other than drone movement. Therefore, userentertainment is limited up to drone commanding. We plan to provide a game environment,which includes drone movement as a component. Gameplay dynamics will increase funprovided considerably.

1.3.2 Augmented Reality GamesThere are many softwares, mainly developed by Parrot [4], to turn the drone controlling into agame experience, which are available both on Google Android Operating System and iOS.These include the following:

AR.Hunter: The drone is chasing a tag, namely a hat worn by a human. AR.Race: The drone is travelling through and around of predefined tags. AR.FlyingAce: Multiplayer game in which drones are trying to hit each other, virtually.

............................................................................................................................................ 4

1.4 Definitions, Abbreviations, AcronymsAbbreviations and acronyms.

RC Radio Controlled

GUI Graphical User Interface

OS Operating System

API Application Programming Interface

SDK Software Development Kit

HTTP HyperText Transfer Protocol

DOF Degrees of Freedom

BT Bluetooth

IMU Inertial Measurement Unit

MEMS Micro Electrical Mechanical System

PWM Pulse­width modulation

ICSP In­circuit serial programming

USB Universal Serial Bus

1.5 References[1]: IEEE Computer Society. Software Engineering Standards Committee, & IEEE­SA Standards Board.(1998). IEEE recommended practice for software requirements specifications. Institute of Electrical andElectronics Engineers.

[2]: Parrot, S. A (2011) AR.FreeFlight website,

............................................................................................................................................ 5

http://ardrone.parrot.com/parrot­ar­drone/en/ar­games/ar­freeflight

[3]: Parrot, S. A. (2011). AR. Drone. website, http://ardrone.parrot.com

[4]: Parrot, S. A. (2011) AR. Drone games. wensite, http://ardrone.parrot.com/parrot­ar­drone/en/ar­games/

1.6 Overview of DocumentIn this document the project and its functionalities will be described thoroughly from differentperspectives. Then, the aspects that are necessary for this project to achieve its aims are goingto be mentioned in detail.

2. Overall Description of ProjectIn this section, general factors that affect the project and the requirements will be describedbriefly. The provided background is needed to fully understand the concept of the product later onthe document.

2.1 Product PerspectiveRC cars, helicopters, planes and quadrocopters, basically toys, have been around for a longtime. They are a major entertainment source for people, not only children but also adults.

Especially model flying vehicles created a vast subject for hobbyists. As the name suggests, allthese vehicles are controlled by specific, relatively big radio control devices. Recently, with themobile devices getting increasingly popular and local wireless communications being quiteefficient and capable a new way to control them introduced. With a specific circuitry on thevehicles, people just use their smartphones with Bluetooth or Wi­Fi connections instead of oldradio controls.

Our product takes advantage of this smartphone controlled devices, and brings a multipurposephysical game­based environment to Android platform.

2.1.1 System InterfacesThis product is an application for Android platform with a controller interface for a RCquadrocopter. Depending on the chosen game mode GUI items vary.

2.1.2 User InterfacesIn this product user will only need a mobile device with our application installed. Initialization and

............................................................................................................................................ 6

synchronization between the mobile phone and the vehicle is handled from the application.Application’s main focus is the flight control screen. This will be similar to any generic flight gamethat already exists on mobile platforms. Extra features will have their own controllers (buttons,sliders, etc.) on the screen depending on the game mode that the user chooses. Application willfollow a similar graphical style throughout all the different screens.

2.1.3 Hardware InterfacesAR Drone, the quadcopter we are going to use, requires Wi­Fi connection to be properlyoperated. The flight controllers and video stream will be done through this connection.Wi­Fi is also required for connecting to the internet, on which high scores will be heldTherefore, the mobile device should have Wi­Fi connector on it.

2.1.4 Software InterfacesThe application is going to run on Android OS, hence the device should be running Android 2.2 orhigher.

2.1.5 Communication InterfacesThe main communication aspect of the project consists of Wi­Fi connection, which will bebetween application and the drone. This one communication line, sent and received componentsare filling up a considerable amount of the communication interfaces. Sent data includesnavigation commands. Received data includes the drone’s state in environment and videostream produced by the built in cameras on the drone.

2.1.6 OperationUser initiated operations start with initializing the application, and making sure the device hasWiFi connectors on. Later on user is going to give the inputs to operate the flight.Unattended operations include, synchronizing the device with the quadcopter, initializing thevehicle for the flight, connect to database server to store the high scores and other flightinformation to keep a flight history for the user.The game is about picking up specific objects places around the playground by the user andbringing them back to a base as fast as possible. The majority of this task is handled by dealttime commands given from the controller provided by the Android application. Upon locating oneof the objects in close range, the user presses the relative button to activate the auto­pilot modewhich will pick up the object by itself. Following that, the user will again take control and bring thedrone back to the base, and put down the object in order to get the next target.

............................................................................................................................................ 7

2.2 Product Functions

2.2.1 InputTaking and processing input will be a trivial part of this project. The way it is going to beimplemented will not bring anything new to the concept. Android interface provides useful tools

............................................................................................................................................ 8

which give developers the chance of spending less time on the functionalities that have beenimplemented many times before and more time on constructing unique aspects which will givethe project its shape. Such will be the case in this project. Basic movement and maneuverinputs will be taken with interface buttons and internal gyroscope of the Android installed device.and held in a neat format for communication.

2.2.2 CommunicationThere will be two types of communication contexts in this project. One is established betweenthe application and the microcontroller on the vehicle. Controlling the movement of the vehicle,transferring the vehicle’s physical state and video streaming will take place on this line usingWi­Fi. Other is established between the application and the internet. This network will be used asa basis for the social aspect of the project, namely high scores, sharing score via social mediaand so on.

2.2.3 Interaction with EnvironmentThis functionality will be in the drone’s responsibility. The built­in cameras will provide videoframes to make users be able to see what is around the drone. The drone’s sensors will also letuser know of it’s orientation and height.

2.3 ConstraintsThe ARDrone Parrot is a four rotor toy helicopter. It has an onboard camera which sendscamera data to mobile phones, namely Apple iOS and Google Android devices.

The AR.Drone has many motions sensors. They are located below the central hull. It features asix DOF, MEMS­based, miniaturized inertial measurement unit. It provides the software withpitch, roll and yaw measurements.

Inertial measurements are used for automatic pitch, roll and yaw stabilization and assistedtilting control. They are needed for generating realistic augmented reality effects. An ultrasoundtelemeter provides with altitude measures for automatic altitude stabilization and assistedvertical speed control.

A camera aiming towards the ground provides with ground speed measures for automatichovering and trimming.

The AR.Drone 2.0 Add 3 DOF to the IMU with a 3 axis magnetometer. It also adds a pressuresensor to allow altitude measurements at any height.

2.4 Assumptions and DependenciesData taken from the video stream is assumed to be processable in any way to implement thegame scenario as desired. Game scenario will be based on figuring out one object from another.

............................................................................................................................................ 9

It also depends on the battery time of the vehicle, which is assumed to be 15 minutes.

The users will also have to have an internet connection to submit their scores.

3. Specific Requirements

3.1 Interface RequirementsThe interface will consist of two analog buttons for maneuvering the vehicle and the video streamsent by the internal camera on the vehicle. Android has many useful API functions to make suchan interface.

3.2 Functional Requirements

3.2.1 InputBasic Android SDK functions are required to handle the user input. These will be used to form aninterface to process button inputs and send the drone them as navigation commands.

3.2.2 CommunicationCommunication aspect of the project will be build on one line of Wi­Fi connection. Thisconnection is required to be capable of sending and receiving commands and feedback dataregarding navigation of the drone. Video frames will also be streamed through this line.

3.3.3 Interaction with EnvironmentThe game scenario will be available to the user through the cameras and sensors on the drone.Therefore the cameras are required to produce a video stream of high quality enough to processthe frames in great detail, which will be giving the developers more space when determining thegame scenario; and sensors should inform the user about the drone’s state.

3.3 Nonfunctional Requirements

3.3.1 Performance RequirementsStreaming video is the most performance sensitive aspect of the project, which has always beensomewhat bandwidth consuming functionality. Other than that, hardware will not getoverwhelmed and cause performance problems.

3.3.2 Design ConstraintsSince the application will be on Android platform, it will be coded with Java. We are bound to use

............................................................................................................................................ 10

Java and Android libraries and API’s for every other aspect of the project except for anythingrelated with ARDrone’s internal microcontroller. ARDrone’s SDK is open source and written in C.

4.Data Description

4.1 Data ObjectsTwo main distinct data objects will be present in the bounds of the project; navigation dataregarding the drone’s state in game environment and streamed video data to be processedframe by frame.

4.1.1 NavDataNavigation data include packages which are sent from the application to the drone. Theseobjects are transformed into strings in a syntax which the microprocessor on the drone canparse and apply. The application also receives data about the orientation of the drone, which areinterpreted by the application and can be shown to user.

4.1.2 Video DataThe other type of data we use is the frame by frame video data which is fed from both front andbottom cameras on the drone. Incoming frame data packets are encoded with P264 codecwhich is in x264 codec family. It is similar to commonly used h264, there are some minordifferences in the header part only. So it requires some customizations to industry standardH264 decoders.

5.Behavioural Model and Description

5.1 Description of Software BehaviourThe game will start in a main menu screen, here the user will have options for starting the game,connecting to device, exiting from the program and general options like sound and controls.The game state will have four buttons for quadrotor movement and two for altitude controls.There will be a feed from the Parrot’s onboard camera in the background. There will also be textmessages that instruct the player and give information about current game objectives.The options menu will have WiFi connection options and also sound options like mute.

5.2 State Transition Diagrams

............................................................................................................................................ 11

6. Planning

6.1 Team StructureThe team consists of 4 members. The project is divided into major parts and distributed over tothem. Hardware integration, data/video streaming, managing the database are the tasks that willbe achieved individually. The other tasks, such as Android programming and Report writing goesin collaboration. Individual sharing of tasks is as follows:

­Mike SOYLU: Back­end network programming, game design­Alper KESKİN: Video processing, native Java programming­Atıl KOÇKAR: Application programming, game design­Ömer Fatih TANRIVERDİ: Documentation, public relations, interface programming/design

7. Conclusion

............................................................................................................................................ 12

Our device will bring mobile gaming to a new height by merging the adrenaline filled experienceof flight with the interactive world of mobile gaming. The challenges of hardware and softwareimplementation of this project will make it a great graduation project which showcase our skillsas computer engineers.

............................................................................................................................................ 13