urbi-tutorial-1.5
67 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres
67 pages
English
Le téléchargement nécessite un accès à la bibliothèque YouScribe
Tout savoir sur nos offres

Description

URBI Tutorial for Urbi 1.5(book compiled from 682M)Jean-Christophe BaillieMathieu NottaleBenoit PothierNicolas DespresURBI Tutorial for Urbi 1.5: (book compiled from 682M)by Jean-Christophe Baillie, Mathieu Nottale, Benoit Pothier, and Nicolas DespresPublication dateCopyright © 2006-2007 Gostai™This document is released under the Attribution-NonCommercial-NoDerivs 2.0 Creative Commons licence (http://creativecommons.org/licenses/by-nc-nd/2.0/deed.en).Table of Contents1. Introduction .............................................................................................................. 12. Installing URBI ........................................................................................................ 2 the memorystick for Aibo ......................................................................... 23. First moves .............................................................................................................. 4Setting and reading a motor value ............................................................................ 4 speed, time or sinusoidal movements ............................................................. 5Discovering variables ............................................................................................ 5General structure for variables ......................................................................... 6Device values and .val alias .......................................................... ...

Informations

Publié par
Nombre de lectures 18
Langue English

Extrait

URBI Tutorial for Urbi 1.5
(book compiled from 682M)
Jean-Christophe Baillie
Mathieu Nottale
Benoit Pothier
Nicolas DespresURBI Tutorial for Urbi 1.5: (book compiled from 682M)
by Jean-Christophe Baillie, Mathieu Nottale, Benoit Pothier, and Nicolas Despres
Publication date
Copyright © 2006-2007 Gostai™
This document is released under the Attribution-NonCommercial-NoDerivs 2.0 Creative Commons licence (http://creativecommons.org/
licenses/by-nc-nd/2.0/deed.en).Table of Contents
1. Introduction .............................................................................................................. 1
2. Installing URBI ........................................................................................................ 2 the memorystick for Aibo ......................................................................... 2
3. First moves .............................................................................................................. 4
Setting and reading a motor value ............................................................................ 4 speed, time or sinusoidal movements ............................................................. 5
Discovering variables ............................................................................................ 5
General structure for variables ......................................................................... 6
Device values and .val alias ............................................................................ 6
Making "global" variables .............................................................................. 6
Expressions .................................................................................................. 6
Lists ................................................................................................................... 6
Running commands in parallel ................................................................................ 7
Conflicting assignments ......................................................................................... 8
Useful device variables and properties ...................................................................... 9 commands ................................................................................................. 9
4. More advanced features ............................................................................................ 10
Branching and looping ......................................................................................... 10
if .............................................................................................................. 10
while ......................................................................................................... 10
for .......................................................................................................... 10
loop .......................................................................................................... 11
Event catching mechanisms ................................................................................... 11
at .............................................................................................................. 11
whenever ................................................................................................... 12
wait, waituntil ............................................................................................. 12
timeout, stopif, freezeif ................................................................................ 12
Soft tests ................................................................................................... 13
Emit events ................................................................................................ 13
Command tags, flags and command control ............................................................. 14
Objects grouping ................................................................................................. 15
Function definition .............................................................................................. 16
Error messages and system messages ...................................................................... 17
Connection priority ............................................................................................. 17
5. Objects in URBI ...................................................................................................... 19
Defining a class .................................................................................................. 19
Virtual methods and attributes ............................................................................... 20
Groups .............................................................................................................. 21
Broadcasting ....................................................................................................... 22
6. The ball tracking example ......................................................................................... 24
Ball detection ..................................................................................................... 24
The main program ............................................................................................... 24
Programming as a behavior graph .......................................................................... 26
Controlling the execution of the behavior ................................................................ 27
7. Images and sounds ................................................................................................... 29
Reading binary values .......................................................................................... 29
Setting binary values ........................................................................................... 29
Associated attributes ............................................................................................ 30
Binary operation examples .................................................................................... 31
8. The liburbi in C++ ................................................................................................... 32
What is liburbi? .................................................................................................. 32
Components and liburbi ....................................................................................... 32
Getting started .................................................................................................... 33
Sending commands .............................................................................................. 33 binary data and sounds ............................................................................. 34
ivURBI Tutorial for Urbi 1.5
Receiving messages ............................................................................................. 34
Data types .......................................................................................................... 35
UMessage .................................................................................................. 35
UValue ...................................................................................................... 35
UBinary ..................................................................................................... 36
USound ..................................................................................................... 36
UImage ..................................................................................................... 36
Synchronous operations ........................................................................................ 36
Synchronous read of a device value ................................................................ 36
Getting an image synchronously .................................................................... 37 sound ......................................................................... 37
Conversion functions ........................................................................................... 37
The "urbiimage" example ..................................................................................... 38
9. Create components: the UObject architecture ................................................................ 40
UObject ............................................................................................................. 40
The basics .................................................................................................. 40
Adding attributes ......................................................................................... 41
Binding functions and events ......................................................................... 43
Timers ....................................................................................................... 44
Advanced types for binaries .......................................................................... 44
The "load" attribute ..................................................................................... 45
The "remote" .................................................................................. 45
The colormap example ................................................................................. 45
The practical side: how to use create an UObject? ............................................. 49
10. Putting all together ..........

  • Univers Univers
  • Ebooks Ebooks
  • Livres audio Livres audio
  • Presse Presse
  • Podcasts Podcasts
  • BD BD
  • Documents Documents