The Urbi Software Development Kit
Version 3.0.0
January 31, 2013
(Revision 3.0)
Urbi
is an open source software component platform. It features a C++/Java middleware, UObject, to interface components, and an innovative scripting language, urbiscript, with built-in support for parallel and event-based programming.
1
Introduction
1.1
Urbi and UObjects
1.2
The Big Picture
1.3
Urbi and urbiscript
1.4
Genesis
1.5
Outline
1.6
Documentation
Contents
2
Getting Started
I
urbiscript User Manual
About This Part
3
First Steps
3.1
Comments
3.2
Literal values
3.3
Function calls
3.4
Variables
3.5
Scopes
3.6
Method calls
3.7
Function definition
3.8
Conclusion
4
Basic Objects, Value Model
4.1
Objects in urbiscript
4.2
Methods
4.3
Everything is an object
4.4
The urbiscript values model
4.5
Conclusion
5
Flow Control Constructs
5.1
if
5.2
while
5.3
for
5.4
switch
5.5
do
6
Advanced Functions and Scoping
6.1
Scopes as expressions
6.2
Advanced scoping
6.3
Local functions
6.4
Lexical closures
7
Objective Programming, urbiscript Object Model
7.1
Prototype-Based Programming in urbiscript
7.2
Prototypes and Slot Lookup
7.3
Copy on Write
7.4
Defining Pseudo-Classes
7.5
Constructors
7.6
Operators
7.7
Properties
7.8
Getters and setters
8
Organizing your code using package and import
8.1
Why object lookup is not enough
8.2
Import and package
9
Functional Programming
9.1
First class functions
9.2
Lambda functions
9.3
Lazy arguments
10
Parallelism, Concurrent Flow Control
10.1
Parallelism operators
10.2
Detach
10.3
Tags for parallel control flows
10.4
timeout, freezeif and stopif
10.5
Advanced example with parallelism and tags
11
Event-based Programming
11.1
Watchdog constructs
11.2
Events
12
Urbi for ROS Users
12.1
Communication on topics
12.2
Using Services
12.3
Image Publisher from ROS to Urbi
12.4
Image Subscriber from Urbi to ROS
12.5
Remote communication
II
Guidelines and Cook Books
About This Part
13
Installation
13.1
Download
13.2
Install & Check
14
Frequently Asked Questions
14.1
Build Issues
14.2
Troubleshooting
14.3
urbiscript
14.4
UObjects
14.5
Miscellaneous
15
Urbi Guideline
15.1
urbiscript Programming Guideline
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
Migration from urbiscript 2 to urbiscript 3
17.1
Automatic function evaluation without parenthesis
17.2
getSlot and setSlot
17.3
Packages
18
Building Urbi SDK
18.1
Building
18.2
Run
18.3
Check
18.4
Debug
III
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-launch-java
— Running a Java UObject
19.7
urbi-ping
— Checking the Delays with a Server
19.8
urbi-send
— Sending urbiscript Commands to a Server
19.9
urbi-sound
— Querying Sounds from a Server
19.10
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 Flow Control
20.11
Event Handling
20.12
Trajectories
20.13
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 Logger
21.37 Math
21.38 Matrix
21.39 Mutex
21.40 nil
21.41 Object
21.42 Orderable
21.43 OutputStream
21.44 Pair
21.45 Path
21.46 Pattern
21.47 Position
21.48 Primitive
21.49 Process
21.50 Profile
21.51 Profile.Function
21.52 PseudoLazy
21.53 PubSub
21.54 PubSub.Subscriber
21.55 RangeIterable
21.56 Regexp
21.57 Semaphore
21.58 Serializables
21.59 Server
21.60 Singleton
21.61 Slot
21.62 Socket
21.63 StackFrame
21.64 Stream
21.65 String
21.66 Subscription
21.67 System
21.68 System.PackageInfo
21.69 System.Platform
21.70 Tag
21.71 Timeout
21.72 Traceable
21.73 TrajectoryGenerator
21.74 Triplet
21.75 Tuple
21.76 UObject
21.77 uobjects
21.78 UValue
21.79 UValueSerializable
21.80 Vector
21.81 void
22
Communication with ROS
22.1 Ros
22.2 Ros.Topic
22.3 Ros.Service
23
Urbi 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
IV
Urbi and UObjects User Manual
About This Part
24
Quick Start
24.1
UObject Basics
24.2
Using urbiscript
24.3
Conclusion
25
The UObject API
25.1
Compiling UObjects
25.2
Creating a class, binding variables and functions
25.3
Creating new instances
25.4
Binding functions
25.5
Notification of a variable change or access
25.6
Data-flow based programming: exchanging UVars
25.7
Data-flow based programming: InputPort
25.8
Timers
25.9
The special case of sensor/actuator variables
25.10
Using Urbi variables
25.11
Emitting events
25.12
UObject and Threads
25.13
Using binary types
25.14
Direct communication between UObjects
25.15
Using hubs to group objects
25.16
Sending urbiscript code
25.17
Using RTP transport in remote mode
25.18
Extending the cast system
26
The UObject Java API
26.1
Compiling and running UObjects
26.2
Creating a class, binding variables and functions
26.3
Creating new instances
26.4
Binding functions
26.5
Notification of a variable change or access
26.6
Timers
26.7
Using Urbi variables
26.8
Sending Urbi code
26.9
Providing a main class or not
26.10
Import the examples with Eclipse
26.11
Run the UObject Java examples
27
Use Cases
27.1
Writing a Servomotor Device
27.2
Using Hubs to Group Objects
27.3
Writing a Camera Device
27.4
Writing a Speaker or Microphone Device
27.5
Writing a Softdevice: Ball Detection
V
Tables and Indexes
About This Part
28
Notations
28.1
Words
28.2
Frames
29
Grammar
30
Release Notes
30.1
Urbi SDK 3.0
30.2
Urbi SDK 2.7.5
30.3
Urbi SDK 2.7.4
30.4
Urbi SDK 2.7.3
30.5
Urbi SDK 2.7.2
30.6
Urbi SDK 2.7.1
30.7
Urbi SDK 2.7
30.8
Urbi SDK 2.6
30.9
Urbi SDK 2.5
30.10
Urbi SDK 2.4
30.11
Urbi SDK 2.3
30.12
Urbi SDK 2.2
30.13
Urbi SDK 2.1
30.14
Urbi SDK 2.0.3
30.15
Urbi SDK 2.0.2
30.16
Urbi SDK 2.0.1
30.17
Urbi SDK 2.0
30.18
Urbi SDK 2.0 RC 4
30.19
Urbi SDK 2.0 RC 3
30.20
Urbi SDK 2.0 RC 2
30.21
Urbi SDK 2.0 RC 1
30.22
Urbi SDK 2.0 beta 4
30.23
Urbi SDK 2.0 beta 3
30.24
Urbi SDK 2.0 beta 2
31
Licenses
31.1
Boost Software License 1.0
31.2
BSD License
31.3
Expat License
31.4
gnu.bytecode
31.5
ICU License
31.6
Independent JPEG Group’s Software License
31.7
Libcoroutine License
31.8
OpenSSL License
31.9
ROS
31.10
Urbi Open Source Contributor Agreement
32
Bibliography
33
Glossary
34
List of Tables
35
List of Figures
Index
Index
Next
Urbi SDK 3.0.0