PIC

The Urbi Software Development Kit


Version 2.3
Gostai

September 30, 2010
(Revision 2.3)

PIC

This documentation is updated regularly on the Gostai Web site both as a PDF document, and as a set of HTML pages. You may also want to look at the documentation of the latest versions.

Urbi SDK 2.3
This version.
Urbi SDK 2.3.x
The latest version of the 2.3 family of versions.
Urbi SDK 2.x
The latest version (also available as http://www.gostai.com/downloads/urbi-sdk/doc).

1 Introduction
 1.1 Urbi and UObjects
 1.2 Urbi and urbiscript
 1.3 Genesis
 1.4 Outline
Contents
2 Getting Started
I  Urbi and UObjects User Manual
About This Part
3 The UObject API
 3.1 Compiling UObjects
 3.2 Creating a class, binding variables and functions
 3.3 Creating new instances
 3.4 Binding functions
 3.5 Notification of a variable change or access
 3.6 Data-flow based programming: exchanging UVars
 3.7 Timers
 3.8 The special case of sensor/effector variables
 3.9 Using Urbi variables
 3.10 Emitting events
 3.11 UObject and Threads
 3.12 Using binary types
 3.13 Using hubs to group objects
 3.14 Sending urbiscript code
 3.15 Using RTP transport in remote mode
4 Use Cases
 4.1 Writing a Servomotor Device
 4.2 Using Hubs to Group Objects
 4.3 Writing a Camera Device
 4.4 Writing a Speaker or Microphone Device
 4.5 Writing a Softdevice: Ball Detection
II  urbiscript User Manual
About This Part
5 First Steps
 5.1 Comments
 5.2 Literal values
 5.3 Function calls
 5.4 Variables
 5.5 Scopes
 5.6 Method calls
 5.7 Function definition
 5.8 Conclusion
6 Basic Objects, Value Model
 6.1 Objects in urbiscript
 6.2 Methods
 6.3 Everything is an object
 6.4 The urbiscript values model
 6.5 Conclusion
7 Flow Control Constructs
 7.1 if
 7.2 while
 7.3 for
 7.4 switch
 7.5 do
8 Advanced Functions and Scoping
 8.1 Scopes as expressions
 8.2 Advanced scoping
 8.3 Local functions
 8.4 Lexical closures
9 Objective Programming, urbiscript Object Model
 9.1 Prototype-based programing in urbiscript
 9.2 Prototypes and slot lookup
 9.3 Copy on write
 9.4 Defining pseudo-classes
 9.5 Constructors
 9.6 Operators
10 Functional Programming
 10.1 First class functions
 10.2 Lambda functions
 10.3 Lazy arguments
11 Parallelism, Concurrent Flow Control
 11.1 Parallelism operators
 11.2 Detach
 11.3 Tags for parallel control flows
 11.4 Advanced example with parallelism and tags
12 Event-based Programming
 12.1 Event related constructs
 12.2 Events
13 Urbi for ROS Users
 13.1 Communication on topics
 13.2 Using Services
III  Guidelines and Cook Books
About This Part
14 Installation
 14.1 Download
 14.2 Install & Check
15 Frequently Asked Questions
 15.1 Build Issues
 15.2 Troubleshooting
 15.3 urbiscript
 15.4 UObjects
 15.5 Miscellaneous
16 Migration from urbiscript 1 to urbiscript 2
 16.1 $(Foo)
 16.2 delete Foo
 16.3 emit Foo
 16.4 eval(Foo)
 16.5 foreach
 16.6 group
 16.7 loopn
 16.8 new Foo
 16.9 self
 16.10 stop Foo
 16.11 # line
 16.12 tag+end
17 Building Urbi SDK
 17.1 Requirements
 17.2 Check out
 17.3 Bootstrap
 17.4 Configure
 17.5 Compile
 17.6 Install
 17.7 Relocatable
 17.8 Run
 17.9 Check
IV  Urbi SDK Reference Manual
About This Part
18 Programs
 18.1 Environment Variables
 18.2 Special Files
 18.3 urbi — Running an Urbi Server
 18.4 urbi-image — Querying Images from a Server
 18.5 urbi-launch — Running a UObject
 18.6 urbi-send — Sending urbiscript Commands to a Server
 18.7 umake — Compiling UObject Components
19 urbiscript Language Reference Manual
 19.1 Syntax
 19.2 Scopes and local variables
 19.3 Functions
 19.4 Objects
 19.5 Structural Pattern Matching
 19.6 Imperative flow control
 19.7 Exceptions
 19.8 Assertions
 19.9 Parallel and event-based flow control
 19.10 Trajectories
 19.11 Garbage collection and limitations
20 urbiscript Standard Library
 20.1 Barrier
 20.2 Binary
 20.3 Boolean
 20.4 CallMessage
 20.5 Channel
 20.6 Code
 20.7 Comparable
 20.8 Container
 20.9 Control
 20.10 Date
 20.11 Dictionary
 20.12 Directory
 20.13 Duration
 20.14 Event
 20.15 Exception
 20.16 Executable
 20.17 File
 20.18 Finalizable
 20.19 Float
 20.20 Float.limits
 20.21 FormatInfo
 20.22 Formatter
 20.23 Global
 20.24 Group
 20.25 InputStream
 20.26 IoService
 20.27 Job
 20.28 Kernel1
 20.29 Lazy
 20.30 List
 20.31 Loadable
 20.32 Lobby
 20.33 Location
 20.34 Math
 20.35 Mutex
 20.36 nil
 20.37 Object
 20.38 Orderable
 20.39 OutputStream
 20.40 Pair
 20.41 Path
 20.42 Pattern
 20.43 Position
 20.44 Primitive
 20.45 Process
 20.46 Profiling
 20.47 PseudoLazy
 20.48 PubSub
 20.49 PubSub.Subscriber
 20.50 RangeIterable
 20.51 Regexp
 20.52 StackFrame
 20.53 Semaphore
 20.54 Server
 20.55 Singleton
 20.56 Socket
 20.57 String
 20.58 System
 20.59 System.PackageInfo
 20.60 System.Platform
 20.61 Tag
 20.62 Timeout
 20.63 Traceable
 20.64 TrajectoryGenerator
 20.65 Triplet
 20.66 Tuple
 20.67 UObject
 20.68 UValue
 20.69 UVar
 20.70 void
21 Communication with ROS
 21.1 Ros
 21.2 Ros.Topic
 21.3 Ros.Service
22 Gostai Standard Robotics API
 22.1 The Structure Tree
 22.2 Frame of Reference
 22.3 Component naming
 22.4 Localization
 22.5 Interface
 22.6 Standard Components
 22.7 Compact notation
 22.8 Support classes
V  Urbi Platforms
About This Part
23 Bioloid
 23.1 Introduction
 23.2 Installing Urbi for Bioloid
 23.3 First steps
24 Mindstorms NXT
 24.1 Launching Urbi for Mindstorms NXT
 24.2 First steps with Urbi to control Mindstorms NXT
 24.3 Default layout reference
 24.4 How to make its own layout
 24.5 Available UObject Devices
25 Nao
 25.1 Introduction
 25.2 Starting up
 25.3 Accessing joints
 25.4 Leds
 25.5 Camera
 25.6 Whole body motion
 25.7 Other sensors
 25.8 Interfacing with NaoQi
26 Pioneer 3-DX
 26.1 Getting started
 26.2 How to use Pioneer 3-DX robot
 26.3 Mobility modes
 26.4 About units
27 Segway RMP
 27.1 RMP
 27.2 GSRAPI compliance
28 Spykee
 28.1 Installing Urbi on the Spykee
 28.2 Device list
 28.3 Dynamically loaded modules
29 Webots
 29.1 Setup
 29.2 Using Urbi as a controller in your Webots worlds
 29.3 Binding your own robots with Urbi for Webots
 29.4 Built-in robots and worlds
 29.5 Webots UObjects
VI  Tables and Indexes
About This Part
30 Notations
 30.1 Words
 30.2 Frames
31 Release Notes
 31.1 Urbi SDK 2.3
 31.2 Urbi SDK 2.2
 31.3 Urbi SDK 2.1
 31.4 Urbi SDK 2.0.3
 31.5 Urbi SDK 2.0.2
 31.6 Urbi SDK 2.0.1
 31.7 Urbi SDK 2.0
 31.8 Urbi SDK 2.0 RC 4
 31.9 Urbi SDK 2.0 RC 3
 31.10 Urbi SDK 2.0 RC 2
 31.11 Urbi SDK 2.0 RC 1
 31.12 Urbi SDK 2.0 beta 4
 31.13 Urbi SDK 2.0 beta 3
 31.14 Urbi SDK 2.0 beta 2
32 Licenses
 32.1 BSD License
 32.2 Expat License
 32.3 Independent JPEG Group’s Software License
 32.4 Libcoroutine License
 32.5 OpenSSL License
 32.6 Urbi Open Source Contributor Agreement
33 Glossary
Index