1
Building Your First WOW!!
Symbian Application
Piotr Madej, Comarch
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
mOTiVaTIon
• Develop team’s competences
• Present the embedded know-how of the Department
• Create a nice demo set
• HAVE FUN
 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
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:
Project Team
 Scrum of 3 (including 1 SM) + 1 (PO)
 4 pigs + 1 chicken (me = sponsor)
 Effort: 10 man-months total
100%
30%
3%
7
Project Resources
Lego Mindstorms NXT 2.0
(8547-1, 619p)
Lego Technic Crane Truck
(8258-1, 1877p)
Lego City Tractor
(7634-1, 78p)
 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
9
What can one afford with:
 10 man-months of work
 3 genius engineers
 672 EUR
?
Frida
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
Frida?
13
Making Frida
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 includes
leeways, shakes of the mechanism and inaccuracy of the
mathematical physics model related to the shape of wheels and
friction
 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
Frida capabilities
 Manual drive (O)
 Automatic drive (SVG based) (M)
 load file (M)
 hand-drafting (O)
 photo tracing (O)
Architecture
Basic
sequence
diagram
Basic sequence diagram
Prototypes
Instruction? Of course!
Rendered with
 Lego Digital Designer
v3.1.3
(http://ldd.lego.com)
 Brick Library
v114.5
Pen changer schematic  Meshing gears
 Rack and pinion
 Clutch
 Worm drives
Moving
 3 movement orders
 moveForward
 moveArc
 rotate
 Standard movement frame
includes only number of
motors' ticks
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
Servo regulator
 Breaking strategies:
 linear
 quadratic
 instant
 hardware (no sync)
 Goal of braking: not just
to stop, but stop
precisely in target
 Fully configurable
Curve manipulation framework
Interpolation
 The route is represented
by a series of lines and
circular arcs
 lines
 elipses
 elliptical arcs
 Bézier curves
Transformation formulas
Other issues
 Drawing path optimisation
 Leeway of the servos
 Wheels
 Auto calibration
GUI
GUI
GUI
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
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
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
Bitmap filtering and vectorizing
 Final touch-up
 modified erosion (to make lines
thinner)
 inverting
Bitmap filtering is fully configurable
Bitmap filtering and vectorizing
 Vectorizing
 labelling
 tracing
 merging (closing, merging torn lines, joining)
 erasing
GUI
GUI
The First Symbian Application
40
Thank you

Building Your First WOW!! Symbian Application

  • 1.
    1 Building Your FirstWOW!! Symbian Application Piotr Madej, Comarch
  • 2.
    Comarch  Comarch wasestablished 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
  • 3.
    mOTiVaTIon • Develop team’scompetences • Present the embedded know-how of the Department • Create a nice demo set • HAVE FUN
  • 4.
     To createa 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
  • 5.
    Project Setup  ComarchSummer Internships 2010  Scrum in use  3 months timeframe (01.07 – 30.09.2010)  Symbian-based smartphone  Base material to be used:
  • 6.
    Project Team  Scrumof 3 (including 1 SM) + 1 (PO)  4 pigs + 1 chicken (me = sponsor)  Effort: 10 man-months total 100% 30% 3%
  • 7.
    7 Project Resources Lego MindstormsNXT 2.0 (8547-1, 619p) Lego Technic Crane Truck (8258-1, 1877p) Lego City Tractor (7634-1, 78p)
  • 8.
     Lego bricksets 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
  • 9.
    9 What can oneafford with:  10 man-months of work  3 genius engineers  672 EUR ?
  • 10.
  • 11.
    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
  • 12.
  • 13.
  • 14.
    Risks  It mayturn 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 includes leeways, shakes of the mechanism and inaccuracy of the mathematical physics model related to the shape of wheels and friction  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
  • 15.
    Frida capabilities  Manualdrive (O)  Automatic drive (SVG based) (M)  load file (M)  hand-drafting (O)  photo tracing (O)
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
    Instruction? Of course! Renderedwith  Lego Digital Designer v3.1.3 (http://ldd.lego.com)  Brick Library v114.5
  • 21.
    Pen changer schematic Meshing gears  Rack and pinion  Clutch  Worm drives
  • 22.
    Moving  3 movementorders  moveForward  moveArc  rotate  Standard movement frame includes only number of motors' ticks
  • 23.
    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
  • 24.
    Servo regulator  Breakingstrategies:  linear  quadratic  instant  hardware (no sync)  Goal of braking: not just to stop, but stop precisely in target  Fully configurable
  • 25.
  • 26.
    Interpolation  The routeis represented by a series of lines and circular arcs  lines  elipses  elliptical arcs  Bézier curves
  • 27.
  • 28.
    Other issues  Drawingpath optimisation  Leeway of the servos  Wheels  Auto calibration
  • 29.
  • 30.
  • 31.
  • 32.
    Bitmap filtering andvectorizing Modified Canny edge detection algorithm  Scaling  not to many segments  not to take to much time to process  Gaussian filtering  remove fluctuations
  • 33.
    Bitmap filtering andvectorizing  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
  • 34.
    Bitmap filtering andvectorizing  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
  • 35.
    Bitmap filtering andvectorizing  Final touch-up  modified erosion (to make lines thinner)  inverting Bitmap filtering is fully configurable
  • 36.
    Bitmap filtering andvectorizing  Vectorizing  labelling  tracing  merging (closing, merging torn lines, joining)  erasing
  • 37.
  • 38.
  • 39.
    The First SymbianApplication
  • 40.