Wiimote / Kinect Lab Design

26
Wiimote/Kinect Lab Design Senior Design December 2011, Group 16 Adviser: Dr. Tom Daniels Brenton Hankins Rick Hanton Harsh Goel Jeff Kramer

description

Wiimote / Kinect Lab Design. Senior Design December 2011, Group 16 Adviser: Dr. Tom Daniels Brenton Hankins Rick Hanton Harsh Goel Jeff Kramer. Schedule. Background on 185 Lab Hardware Software Design Software Components Test Cases Schedule and Cost. Solution. - PowerPoint PPT Presentation

Transcript of Wiimote / Kinect Lab Design

Page 1: Wiimote / Kinect  Lab Design

Wiimote/Kinect Lab DesignSenior Design December 2011, Group 16

Adviser: Dr. Tom Daniels

Brenton HankinsRick HantonHarsh GoelJeff Kramer

Page 2: Wiimote / Kinect  Lab Design

Schedule• Background on 185 Lab• Hardware• Software Design• Software Components• Test Cases• Schedule and Cost

Page 3: Wiimote / Kinect  Lab Design

Solution

Page 4: Wiimote / Kinect  Lab Design

Project Description• Software design for Dr. Daniels for Iowa State CprE 185 classes• Provide simple-to-use input for student code• Current C code allows students to pipe output to their own

programs• A GUI program allows viewing of Wii Remote output and

piped output simultaneously, but has scheduling issues• Provide an interface for both Wii Remotes (polish existing

code) and Microsoft Kinect

Page 5: Wiimote / Kinect  Lab Design

Functional Requirements• Develop an installer for the Wiimote project.• Identify and Remove errors from the Wiimote lab software • Correct buffering problems and synchronize user program with

the incoming data stream.• Make Kinect sensor data streams available to the user in an

efficient and real-time manner• Provide an interactive application that students can program

using the Kinect data.• Have an interface to write programs on the received Kinect

data and run them.

Page 6: Wiimote / Kinect  Lab Design

Non-Functional Requirements• Reliability: We will refine and package the software that is

designed. This pertains to optimization of real-time processes such as data processing. A testing plan shall be developed for this purpose.

• Portability: The project shall be portable between computers. We will cater mainly to windows, but will ensure that our libraries are extendable in case there is a need to adapt it to another system. Additionally, the software shall be easy to install and remove.

• Usability: The project shall be easy to use, both for instructors and students. It shall simplify tasks to set up and run projects by means of intuitive GUIs so that students can focus on problem solving aspects as much as possible.

Page 7: Wiimote / Kinect  Lab Design

Assumptions• The software is designed to be used in a Windows computer

lab that has both a bluetooth dongle and a Wiimote or a Kinect sensor at each computer terminal.

• We are currently assuming that the Microsoft SDK will be released in the next week or two, otherwise development will continue based on the OpenKinect software on the Windows platform

Page 8: Wiimote / Kinect  Lab Design

Existing Developed Software• The Wii Wrap software was previously developed by a student

at Iowa State• Similar software for the Wii Remote exists such as Wiimote

Whiteboard, WiinRemote, or GlovePie• OpenKinect is a package of software created by enthusiasts to

run Kinect programs on Linux, Mac, and Windows• Within a few weeks Microsoft will release a Kinect SDK

specifically for Windows

Page 9: Wiimote / Kinect  Lab Design

RisksRisk 1: Temporarily lose a developer from our team for unforeseen reasons.Mitigation 1: The team will do our best to continue work without the developer while they

are gone and rely on a detailed documentation trail. We will use technologies like Skype and email to keep in touch with the developer during their absence.

Risk 2: Unable to keep tasks fully on schedule due to other projects and schoolwork.Mitigation 2: Set up minor deadlines to make progress on larger tasks. Risk 3: Important equipment becomes lost or nonfunctional (Wiimote, Kinects)Mitigation 3: Jeff has several personal Wiimotes available to him for use and there are one

or two extra department-owned Kinects Dr. Daniels has for use. Risk 4: No individuals on the project team have experience programming with

graphics APIs.Mitigation 4: We have built periods of time into our schedule for us to work on developing

the necessary experience with OpenGL and SDL environments to allow us to design and develop software for the Kinect efficiently.

Page 10: Wiimote / Kinect  Lab Design

Hardware - Wii• Wii Remote / Wiimote• 11 buttons + Power• Roll/Pitch/Yaw Gyro• Infrared Sensor• Speaker (unsupported)• Optional Nunchuck (unsupported)

Page 11: Wiimote / Kinect  Lab Design

Hardware - Kinect• RGB Webcam Camera 640x480 @ 30 Hz (center)• IR Projector Projects Grid for Depth Mapping• IR Camera at 640x480 @ 30 Hz collects depth data (right)• Microphones give room audio• Small Panning motor

turns sensor bar from side to side

• Onboard image preprocessing

• Projector power draw requires extra AC power

Thanks to iFixit for some specs data

Page 12: Wiimote / Kinect  Lab Design

Software Dataflow Wii Lab

Page 13: Wiimote / Kinect  Lab Design

Development Software SelectionWii Wrap• Written in C• GUI written in Java• Testing will be done with JNI to improve performance of GUIKinect SDK• Written in C++Wii Wrap installer• MSI

Page 14: Wiimote / Kinect  Lab Design

How Wii Wrap Works

Wii Wrap GUI

Configure

Set Up Wii Wrap Path

Set Up User Program Path

Run

Run Wii Wrap

Run User Program

Stop / Emergency Stop

Data FlowGUI Window Provides

Output

Page 15: Wiimote / Kinect  Lab Design

Wii Wrap GUI

Page 16: Wiimote / Kinect  Lab Design

Wii Wrap GUI• Fix Run/Stopped Errors in GUI when the Wii Wrap software

doesn’t execute as planned.• Discover where the lag in display output is (Java Buffers,

Windows I/O)• Integrate GUI into Wii Wrap installer

Page 17: Wiimote / Kinect  Lab Design

Kinect - ApproachesNaïve Approach• Develop similar text output program that is based on

OpenKinect, using OpenGL, pthreads, and the Windows port of the Linux USB library functions

• Allow students to generate a spreadsheet of data that they can work on before developing real-time software.

Con: Slow, lots of text processing and possibly storage

Page 18: Wiimote / Kinect  Lab Design

Kinect - Approaches

What we need• Provide a GUI environment that would use OpenGL (or an

alternative) to show basic output of the Kinect (depth on video) as well as user modifications to the video data (head replacement, skeleton tracking, etc).

• Want to make use as painless as possible (no pthreads etc to deal with)

Visualized Depth Data as RGB

Page 19: Wiimote / Kinect  Lab Design

Kinect - Design• Need to evaluate how to best integrate student code• Concept A : Process-Update Model

• Provide a framework of classes that students modify without needing to know how OO programming works

Process* Update*API for the Student

Called when new frame data is available

Called to update the screen after processing

User Models

* -> function pointers

Page 20: Wiimote / Kinect  Lab Design

Kinect• Backend: High-Level Sketch

Acquire Moving Average of Frames

Apply User-Defined Process* Function

Apply User-Defined Update* Function

Apply Changes to Output Screen

• Anticipated User View

Input Screen Output Screen

Page 21: Wiimote / Kinect  Lab Design

Test Plan• We will use similar test plans for both the Wii and Kinect.• Initially we will use black box testing methods on individual

modules of the program.• Testing boundary input values such as null, negative values, etc.• Randomizing input values in case edge case is missed

• The second phase of testing will be integration testing.• Testing the entire system as a whole single unit• Making sure all the individual modules function when combined

• GUI testing can be done alongside integration phase of the testing plan.• Consists of making sure GUI is responsive, functions properly

(buttons do the correct actions)

Page 22: Wiimote / Kinect  Lab Design

Test Plan (Part 2)• Once the functionality is tested, we will need to do

performance testing especially on the GUI.• Use Eclipse TPTP to test performance.• Test GUI input buffering, load tests, etc.

• Will have Dr. Daniels use the programs to see if they are satisfactory and what changes need to be made.• Make revisions to code based on Daniels’ feedback

Page 23: Wiimote / Kinect  Lab Design

Schedule

Page 24: Wiimote / Kinect  Lab Design

Cost EstimatesItem Cost

Microsoft Kinect (1) for development $150

Wiimotes and Bluetooth adapters $0 (owned by dept.)

Total: $150

Page 25: Wiimote / Kinect  Lab Design

Cost EstimatesTask Estimated Hours # People per

TaskEstimated Cost

@ $20/hrs

Define Customer Requirements 20 4 $400

Refine Customer Requirements 20 4 $400

Project Plan 40 4 $800

Set Up Website 20 2 $400

Final Design Document 80 4 $1,600

Design Review 8 4 $160

Remove Known Bugs from Wii Wrap 20 1 $400

Develop Installer for Wii Project 20 1 $400

Write Documentation for Wii Project 20 2 $400

Research Software for Kinect Package 100 2 $2,000

Development on Kinect Package 600 4 $12,000

Document Kinect Package 20 2 $400

Testing of Kinect Package 350 4 $7,000

Total 1318 $26,360

Page 26: Wiimote / Kinect  Lab Design

Questions?