URBI Tutorial

(book compiled from Revision 142)

Jean-Christophe Baillie

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
2. Installing URBI
Installing the memorystick for Aibo
3. First moves
Setting and reading a motor value
Setting speed, time or sinusoidal movements
Discovering variables
General structure for variables
Device values and .val alias
Making "global" variables
Running commands in parallel
Conflicting assignments
Useful device variables and properties
Useful commands
4. More advanced features
Branching and looping
for, foreach
loop, loopn
Event catching mechanisms
wait, waituntil
timeout, stopif, freezeif
Soft tests
Emit events
Simple events
Events with parameters
Event duration
Pulsing events: the every command
Command tags, flags and command control
Objects grouping
Function definition
Error messages and system messages
5. Objects in URBI
Defining a class
Virtual methods and attributes
6. The ball tracking example
Ball detection
The main program
Programming as a behavior graph
Controlling the execution of the behavior
7. Images and sounds
Reading binary values
Setting binary values
Associated attributes
Binary operation examples
8. The liburbi in C++
What is liburbi?
Components and liburbi
Getting started
Sending commands
Sending binary data and sounds
Receiving messages
Data types
Synchronous operations
Synchronous read of a device value
Getting an image synchronously
Getting sound synchronously
Conversion functions
The "urbiimage" example
9. Create components: the UObject architecture
The basics
Adding attributes
Binding functions and events
Advanced types for binaries
The "load" attribute
The "remote" attribute
The colormap example
The practical side: how to use a UObject?
How to install a sdk to build/link components for your robot?
How to create and use a plugin or remote component?
How to plug several components into your URBI server?
How to distribute one of your components and make them available to others?
10. Putting all together
Typical usages examples
A. Copyright

List of Figures

4.1. A typical motor device hierarchy
6.1. The ball tracking behavior graph
10.1. The general URBI architecture, putting all together