building your first wow!! symbian application

40
1 Building Your First WOW!! Symbian Application Piotr Madej, Comarch

Upload: comarch-telecommunications-business-unit

Post on 22-Nov-2014

130 views

Category:

Documents


0 download

DESCRIPTION

What a Mexican painter, a Symbian smartphone and Lego bricks have in common.

TRANSCRIPT

Page 1: Building Your First WOW!! Symbian Application

1

Building Your First WOW!!

Symbian Application

Piotr Madej, Comarch

Page 2: Building Your First WOW!! Symbian Application

Comarch Comarch was established in 1993 and is the largest indepentent SW House and IT product vendor in Poland today, with market capitalization of 250M€ and 3500+ employees,

quated on the Warsaw Stock Exchange since 1999, with very strong links to technical universities around Western Europe, developing products and rendering services for

Telecommunications

Banking & Finance

Industry & Utilities

Trade

Public Sector

Small & Medium Enterprises

Comarch sells proprietary products, solutions and services on the global market, including Europe, Americas and APAC, having customers on 4 continents in more than 20 countries.

Comarch Group Employment

Page 3: Building Your First WOW!! Symbian Application

mOTiVaTIon

• Develop team’s competences• Present the embedded know-how of the Department• Create a nice demo set

• HAVE FUN

Page 4: Building Your First WOW!! Symbian Application

To create a mobile, wireless robot capable of drawing an input vector graphic with color markers on a paper sheet, controlled by a Symbian OS-based mobile phone and Bluetooth for data interchange

Project Goal

Page 5: Building Your First WOW!! Symbian Application

Project Setup

Comarch Summer Internships 2010

Scrum in use

3 months timeframe (01.07 – 30.09.2010)

Symbian-based smartphone

Base material to be used:

Page 6: Building Your First WOW!! Symbian Application

Project Team

Scrum of 3 (including 1 SM) + 1 (PO)

4 pigs + 1 chicken (me = sponsor)

Effort: 10 man-months total

100%

30%

3%

Page 7: Building Your First WOW!! Symbian Application

7

Project Resources

Lego Mindstorms NXT 2.0(8547-1, 619p)

Lego Technic Crane Truck (8258-1, 1877p)

Lego City Tractor (7634-1, 78p)

Page 8: Building Your First WOW!! Symbian Application

Lego brick sets 408.00 EUR

Markers ~ 5.00 EUR

Flipchart paper ~ 3.00 EUR

Charger and batteries 18.00 EUR

Nokia 5800 XpressMusic 230.00 EUR

Bluetooth Dongle 8.00 EUR

Total 672.00 EUR

Project Budget

Page 9: Building Your First WOW!! Symbian Application

9

What can one afford with:

10 man-months of work

3 genius engineers

672 EUR

?

Page 10: Building Your First WOW!! Symbian Application

Frida

Page 11: Building Your First WOW!! Symbian Application

Frida in numbers

1126 bricks

38 gears

4 worm gears

3 servo motors

2 micro switches

2 wheels

1 ultrasound sensor

1 color sensor

1 LEGO NXT brick

6330 lines of Symbian code (508kB)

1360 lines of NXC code (37kB)

6 AA batteries

2 marker colors

Page 12: Building Your First WOW!! Symbian Application

Frida?

Page 13: Building Your First WOW!! Symbian Application

13

Making Frida

Page 14: Building Your First WOW!! Symbian Application

Risks It may turn out to be challenging to develop a feasible mechanical

design to be mechanically stable, minimizing unwanted friction and providing maximum control over motored wheels

The robot might be mechanically unstable, it may perform unexpected motor movements or micro-movements. This includesleeways, shakes of the mechanism and inaccuracy of the mathematical physics model related to the shape of wheels andfriction

The NXT direct commands, which can be sent to the microcontroller to control the motors, are architecturally inaccurate, eg. have only 100 possible ratios between motor speeds. Similar limitations exist for the angle for which to turn the motor, etc. It creates a systematic uncertainty, which has to be taken into account when calculating movements

Basic version of the Qt framework does not support the Bluetooth interface. Communications code will likely have to be written in low-level platform-specific code. It is likely that Bluetooth code written for Symbian won't work in the simulated PC environment, and vice versa

Page 15: Building Your First WOW!! Symbian Application

Frida capabilities

Manual drive (O)

Automatic drive (SVG based) (M)

load file (M)

hand-drafting (O)

photo tracing (O)

Page 16: Building Your First WOW!! Symbian Application

Architecture

Page 17: Building Your First WOW!! Symbian Application

Basic

sequence

diagram

Page 18: Building Your First WOW!! Symbian Application

Basic sequence diagram

Page 19: Building Your First WOW!! Symbian Application

Prototypes

Page 20: Building Your First WOW!! Symbian Application

Instruction? Of course!

Rendered with

Lego Digital Designerv3.1.3 (http://ldd.lego.com)

Brick Library v114.5

Page 21: Building Your First WOW!! Symbian Application

Pen changer schematic Meshing gears

Rack and pinion

Clutch

Worm drives

Page 22: Building Your First WOW!! Symbian Application

Moving

3 movement orders

moveForward

moveArc

rotate

Standard movement frame includes only number of motors' ticks

Page 23: Building Your First WOW!! Symbian Application

Servo regulator

Goal: to control both servo motor hubs' position fast, precisely, synchronously and without over-regulation

Solution: Quasilinear regulator instead of built-in PID regulator

Theory: both motors are going with constant speed, but... phasing introduced

Accelerating with preset minimal speed (not enough power to start, when stopped) and taking battery level into account

Page 24: Building Your First WOW!! Symbian Application

Servo regulator

Breaking strategies:

linear

quadratic

instant

hardware (no sync)

Goal of braking: not just to stop, but stop precisely in target

Fully configurable

Page 25: Building Your First WOW!! Symbian Application

Curve manipulation framework

Page 26: Building Your First WOW!! Symbian Application

Interpolation

The route is represented by a series of lines and circular arcs

lines

elipses

elliptical arcs

Bézier curves

Page 27: Building Your First WOW!! Symbian Application

Transformation formulas

Page 28: Building Your First WOW!! Symbian Application

Other issues

Drawing path optimisation

Leeway of the servos

Wheels

Auto calibration

Page 29: Building Your First WOW!! Symbian Application

GUI

Page 30: Building Your First WOW!! Symbian Application

GUI

Page 31: Building Your First WOW!! Symbian Application

GUI

Page 32: Building Your First WOW!! Symbian Application

Bitmap filtering and vectorizing

Modified Canny edge detection algorithm

Scaling

not to many segments

not to take to much time to process

Gaussian filtering

remove fluctuations

Page 33: Building Your First WOW!! Symbian Application

Bitmap filtering and vectorizing

Gradients computing

edge detection by gradient mask[ 1 2 1] [1 0 -1]

[ 0 0 0] and [2 0 -2]

[-1 -2 -1] [1 0 -1]

Non-maximum suppression

clearing all pixels that are not extremal in their local neighbourhood

edges are thinner and more clear rather than but thick and blurred

Page 34: Building Your First WOW!! Symbian Application

Bitmap filtering and vectorizing

Blurring

merging both sides of a line to be one

further removal of deviations

Double threshold binarization

determine which pixels are finally the edge ones

double values (upper and lower thresholds) are used

Page 35: Building Your First WOW!! Symbian Application

Bitmap filtering and vectorizing

Final touch-up

modified erosion (to make lines thinner)

inverting

Bitmap filtering is fully configurable

Page 36: Building Your First WOW!! Symbian Application

Bitmap filtering and vectorizing

Vectorizing

labelling

tracing

merging (closing, merging torn lines, joining)

erasing

Page 37: Building Your First WOW!! Symbian Application

GUI

Page 38: Building Your First WOW!! Symbian Application

GUI

Page 39: Building Your First WOW!! Symbian Application

The First Symbian Application

Page 40: Building Your First WOW!! Symbian Application

40

Thank you