PIC

The Urbi Software Development Kit


Version 2.5
Gostai

December 7, 2010
(Revision 2.5)

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.5
This version.
Urbi SDK 2.5.x
The latest version of the 2.5 family of versions.
Urbi SDK 2.x
The latest version (also available as http://www.gostai.com/downloads/urbi/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 Data-flow based programming: InputPort
 3.8 Timers
 3.9 The special case of sensor/effector variables
 3.10 Using Urbi variables
 3.11 Emitting events
 3.12 UObject and Threads
 3.13 Using binary types
 3.14 Using hubs to group objects
 3.15 Sending urbiscript code
 3.16 Using RTP transport in remote mode
 3.17 Extending the cast system
4 The UObject Java API
 4.1 Compiling and running UObjects
 4.2 Creating a class, binding variables and functions
 4.3 Creating new instances
 4.4 Binding functions
 4.5 Notification of a variable change or access
 4.6 Timers
 4.7 Using Urbi variables
 4.8 Sending Urbi code
 4.9 Providing a main class or not
 4.10 Import the examples with Eclipse
 4.11 Run the UObject Java examples
5 Use Cases
 5.1 Writing a Servomotor Device
 5.2 Using Hubs to Group Objects
 5.3 Writing a Camera Device
 5.4 Writing a Speaker or Microphone Device
 5.5 Writing a Softdevice: Ball Detection
II  urbiscript User Manual
About This Part
6 First Steps
 6.1 Comments
 6.2 Literal values
 6.3 Function calls
 6.4 Variables
 6.5 Scopes
 6.6 Method calls
 6.7 Function definition
 6.8 Conclusion
7 Basic Objects, Value Model
 7.1 Objects in urbiscript
 7.2 Methods
 7.3 Everything is an object
 7.4 The urbiscript values model
 7.5 Conclusion
8 Flow Control Constructs
 8.1 if
 8.2 while
 8.3 for
 8.4 switch
 8.5 do
9 Advanced Functions and Scoping
 9.1 Scopes as expressions
 9.2 Advanced scoping
 9.3 Local functions
 9.4 Lexical closures
10 Objective Programming, urbiscript Object Model
 10.1 Prototype-based programing in urbiscript
 10.2 Prototypes and slot lookup
 10.3 Copy on write
 10.4 Defining pseudo-classes
 10.5 Constructors
 10.6 Operators
 10.7 Properties
11 Functional Programming
 11.1 First class functions
 11.2 Lambda functions
 11.3 Lazy arguments
12 Parallelism, Concurrent Flow Control
 12.1 Parallelism operators
 12.2 Detach
 12.3 Tags for parallel control flows
 12.4 Advanced example with parallelism and tags
13 Event-based Programming
 13.1 Watchdog constructs
 13.2 Events
14 Urbi for ROS Users
 14.1 Communication on topics
 14.2 Using Services
III  Guidelines and Cook Books
About This Part
15 Installation
 15.1 Download
 15.2 Install & Check
16 Frequently Asked Questions
 16.1 Build Issues
 16.2 Troubleshooting
 16.3 urbiscript
 16.4 UObjects
 16.5 Miscellaneous
17 Migration from urbiscript 1 to urbiscript 2
 17.1 $(Foo)
 17.2 delete Foo
 17.3 emit Foo
 17.4 eval(Foo)
 17.5 foreach
 17.6 group
 17.7 loopn
 17.8 new Foo
 17.9 self
 17.10 stop Foo
 17.11 # line
 17.12 tag+end
18 Building Urbi SDK
 18.1 Requirements
 18.2 Check out
 18.3 Bootstrap
 18.4 Configure
 18.5 Compile
 18.6 Install
 18.7 Relocatable
 18.8 Run
 18.9 Check
IV  Urbi SDK Reference Manual
About This Part
19 Programs
 19.1 Environment Variables
 19.2 Special Files
 19.3 urbi — Running an Urbi Server
 19.4 urbi-image — Querying Images from a Server
 19.5 urbi-launch — Running a UObject
 19.6 urbi-ping — Checking the Delays with a Server
 19.7 urbi-send — Sending urbiscript Commands to a Server
 19.8 umake — Compiling UObject Components
20 urbiscript Language Reference Manual
 20.1 Syntax
 20.2 Scopes and local variables
 20.3 Functions
 20.4 Objects
 20.5 Enumeration types
 20.6 Structural Pattern Matching
 20.7 Imperative flow control
 20.8 Exceptions
 20.9 Assertions
 20.10 Parallel and event-based flow control
 20.11 Trajectories
 20.12 Garbage collection and limitations
21 urbiscript Standard Library
 21.1 Barrier
 21.2 Binary
 21.3 Boolean
 21.4 CallMessage
 21.5 Channel
 21.6 Code
 21.7 Comparable
 21.8 Container
 21.9 Control
 21.10 Date
 21.11 Dictionary
 21.12 Directory
 21.13 Duration
 21.14 Enumeration
 21.15 Event
 21.16 Exception
 21.17 Executable
 21.18 File
 21.19 Finalizable
 21.20 Float
 21.21 Float.limits
 21.22 FormatInfo
 21.23 Formatter
 21.24 Global
 21.25 Group
 21.26 Hash
 21.27 InputStream
 21.28 IoService
 21.29 Job
 21.30 Kernel1
 21.31 Lazy
 21.32 List
 21.33 Loadable
 21.34 Lobby
 21.35 Location
 21.36 Math
 21.37 Mutex
 21.38 nil
 21.39 Object
 21.40 Orderable
 21.41 OutputStream
 21.42 Pair
 21.43 Path
 21.44 Pattern
 21.45 Position
 21.46 Primitive
 21.47 Process
 21.48 Profiling
 21.49 PseudoLazy
 21.50 PubSub
 21.51 PubSub.Subscriber
 21.52 RangeIterable
 21.53 Regexp
 21.54 StackFrame
 21.55 Semaphore
 21.56 Server
 21.57 Singleton
 21.58 Socket
 21.59 String
 21.60 System
 21.61 System.PackageInfo
 21.62 System.Platform
 21.63 Tag
 21.64 Timeout
 21.65 Traceable
 21.66 TrajectoryGenerator
 21.67 Triplet
 21.68 Tuple
 21.69 UObject
 21.70 UValue
 21.71 UVar
 21.72 void
22 Communication with ROS
 22.1 Ros
 22.2 Ros.Topic
 22.3 Ros.Service
23 Gostai Standard Robotics API
 23.1 The Structure Tree
 23.2 Frame of Reference
 23.3 Component naming
 23.4 Localization
 23.5 Interface
 23.6 Standard Components
 23.7 Compact notation
 23.8 Support classes
V  Urbi Platforms
About This Part
24 Bioloid
 24.1 Introduction
 24.2 Installing Urbi for Bioloid
 24.3 First steps
25 Mindstorms NXT
 25.1 Launching Urbi for Mindstorms NXT
 25.2 First steps with Urbi to control Mindstorms NXT
 25.3 Default layout reference
 25.4 How to make its own layout
 25.5 Available UObject Devices
26 Nao
 26.1 Introduction
 26.2 Starting up
 26.3 Accessing joints
 26.4 Leds
 26.5 Camera
 26.6 Whole body motion
 26.7 Other sensors
 26.8 Interfacing with NaoQi
27 Pioneer 3-DX
 27.1 Getting started
 27.2 How to use Pioneer 3-DX robot
 27.3 Mobility modes
 27.4 About units
28 Segway RMP
 28.1 RMP
 28.2 GSRAPI compliance
29 Spykee
 29.1 Installing Urbi on the Spykee
 29.2 Device list
 29.3 Dynamically loaded modules
30 Webots
 30.1 Setup
 30.2 Using Urbi as a controller in your Webots worlds
 30.3 Binding your own robots with Urbi for Webots
 30.4 Built-in robots and worlds
 30.5 Webots UObjects
VI  Tables and Indexes
About This Part
31 Notations
 31.1 Words
 31.2 Frames
32 Release Notes
 32.1 Urbi SDK 2.5
 32.2 Urbi SDK 2.4
 32.3 Urbi SDK 2.3
 32.4 Urbi SDK 2.2
 32.5 Urbi SDK 2.1
 32.6 Urbi SDK 2.0.3
 32.7 Urbi SDK 2.0.2
 32.8 Urbi SDK 2.0.1
 32.9 Urbi SDK 2.0
 32.10 Urbi SDK 2.0 RC 4
 32.11 Urbi SDK 2.0 RC 3
 32.12 Urbi SDK 2.0 RC 2
 32.13 Urbi SDK 2.0 RC 1
 32.14 Urbi SDK 2.0 beta 4
 32.15 Urbi SDK 2.0 beta 3
 32.16 Urbi SDK 2.0 beta 2
33 Licenses
 33.1 BSD License
 33.2 Expat License
 33.3 Independent JPEG Group’s Software License
 33.4 Libcoroutine License
 33.5 OpenSSL License
 33.6 Urbi Open Source Contributor Agreement
34 Glossary
Index