Urbi SDK is a fully-featured environment to orchestrate complex organizations of components. It relies
on a middleware architecture that coordinates components named UObjects. It also features urbiscript,
a scripting language that can be used to write orchestration programs.
Urbi makes the orchestration of independent, concurrent, components easier. It was first designed for
robotics: it provides all the needed features to coordinate the execution of various components
(actuators, sensors, software devices that provide features such as text-to-speech, face recognition and
so forth). Languages such as C ++ are well suited to program the local, low-level, handling of these
hardware or software devices; indeed one needs efficiency, small memory footprint, and
access to low-level hardware details. Yet, when it comes to component orchestration and
coordination, in a word, when it comes to addressing concurrency, it can be tedious to use such
languages.
Middleware infrastructures make possible to use remote components as if they were local, to allow
concurrent execution, to make synchronous or asynchronous requests and so forth. The
UObject C ++ architecture provides exactly this: a common API that allows conforming
components to be used seamlessly in highly concurrent settings. Components need not be
designed with UObjects in mind, rather, UObjects are typically “shells” around “regular”
components.
Components with an UObject interface are naturally supported by the urbiscript programming
language. This provides a tremendous help: one can interact with these components (making queries,
changing them, observing their state, monitoring various kinds of events and so forth), which provides
a huge speed-up during development.
Although made with robots in mind, the UObject architecture is well suited to tame any heavily
concurrent environment, such as video games or complex systems in general.
The Section 1.1 shows the architecture of Urbi. Let’s browse it bottom up.
At the lowest level, Urbi requires a (possibly very limited) embedded computer. This is the case for
most robots today, but on occasion, some device cannot even run reasonably small pieces of code. In
that case, Urbi can still be used, but then the robot is actually remote-controlled from a computer
running Urbi.
Right on top of the hardware, is running the Operating System. Urbi supports the major OSes; it
was also ported on top of real-time OSes such as Xenomai, and on specific OSes such as Aperios,
Sony’s proprietary system running its Aibo robotic dog.
The Urbi Runtime, which is the actual core of the system, also known as the engine or the kernel,
is interfacing the OS with the rest of the Urbi world, urbiscript and UObjects.
UObjects are used to bind hardware or software components, such as actuators and sensors on the
one hand, and voice synthesis or face recognition on the other hand. They can be run locally on the
robot, or on a remote, more powerful, computer.
To orchestrate all the components, urbiscript is a programming language of choice (see
below).
Finally, applications are available for the Urbi environment. For instance, Gostai Studio provides
high-level tools to develop complex robotic behaviors.
urbiscript is a programming language primarily designed for robotics. It’s a dynamic, prototype-based,
object-oriented scripting language. It supports and emphasizes parallel and event-based programming,
which are very popular paradigms in robotics, by providing core primitives and language
constructs.
Its main features are:
- syntactically close to C ++.
If you know C, C ++, Java, or JavaScript, you can easily write urbiscript programs.
- fully integrated with C ++.
You can bind C ++ classes in urbiscript seamlessly. urbiscript is also integrated with many
other languages such as Java, MatLab or Python.
- object-oriented.
It supports encapsulation, inheritance and inclusion polymorphism. Dynamic dispatching
is available through monomethods — just as C ++, C# or Java.
- concurrent.
It provides you with natural constructs to run and control high numbers of interacting
concurrent tasks.
- event-based.
Triggering events and reacting to them is absolutely straightforward.
- functional programming.
Inspired by languages such as Lisp or Caml, urbiscript features first class functions and
pattern matching.
- client/server.
The interpreter accepts multiple connections from different sources (human users, robots,
other servers …) and enables them to interact.
- distributed.
You can run objects in different processes, potentially remote computers across the
network.
Urbi what first designed and implemented by Jean-Christophe Baillie, together with Matthieu Nottale.
Because its users wildly acclaimed it, Jean-Christophe founded Gostai, a France-based Company that
develops software for robotics with a strong emphasis on personal robotics.
Authors
Urbi SDK 1 was further developed by Akim Demaille, Guillaume Deslandes, Quentin Hocquet, and
Benoît Sigoure.
The Urbi SDK 2 project was started and developed by Akim Demaille, Quentin Hocquet, Matthieu
Nottale, and Benoît Sigoure. Samuel Tardieu provided an immense help during the year 2008, in
particular for the concurrency and event support.
The maintenance is currently carried out by Akim Demaille, Quentin Hocquet, and Matthieu
Nottale. Jean-Christophe Baillie is still deeply involved in the development of urbiscript, he regularly
submits ideas, and occasionally even code!
Contributors
A number of people contributed significantly to Urbi, including Alexandre Morgand, Romain
Bezut, Thomas Moulard, Clément Moussu, Nicolas Pierron.
This multi-part document provides a complete guide to Urbi. See paragraph 34 for the various
notations that are used in the document.
-
Listing I — Urbi and UObjects User Manual
-
This part covers the Urbi architecture: its core components (client/server architecture), how its
middleware works, how to include extensions as UObjects (C ++ components) and so
forth.
No knowledge of the urbiscript language is needed. As a matter of fact, Urbi can be
used as a standalone middleware architecture to orchestrate the execution of existing
components.
Yet urbiscript is a feature that “comes for free”: it is easy using it to experiment, prototype, and
even program fully-featured applications that orchestrate native components. The interested
reader should read either the urbiscript user manual (Listing II), or the reference manual
(Section 22).
-
Listing 3 — Quick Start
-
This chapter, self-contained, shows the potential of Urbi used as a middleware.
-
Section 4 — The UObject API
-
This section shows the various steps of writing an Urbi C ++ component using the
UObject API.
-
Listing 5 — The UObject Java API
-
UObjects can also be written in Java. This section demonstrates it all.
-
Section 6 — Use Cases
-
Interfacing a servomotor device as an example on how to use the UObject architecture
as a middleware.
Listing II — urbiscript User Manual
This part, also known as the “urbiscript tutorial”, teaches the reader how to program in
urbiscript. It goes from the basis to concurrent and event-based programming. No specific
knowledge is expected. There is no need for a C ++ compiler, as UObject will not be covered here
(see Listing I). The reference manual contains a terse and complete definition of the Urbi
environment (Section IV).
-
Listing 7 — First Steps
-
First contacts with urbiscript.
-
Section 8 — Basic Objects, Value Model
-
A quick introduction to objects and values.
-
Section 9 — Flow Control Constructs
-
Basic control flow: if, for and the like.
-
Listing 10 — Advanced Functions and Scoping
-
Details about functions, scoped, and lexical closures.
-
Listing 11 — Objective Programming, urbiscript Object Model
-
A more in-depth introduction to object-oriented programming in urbiscript.
-
Listing 12 — Functional Programming
-
Functions are first-class citizens.
-
Listing 13 — Parallelism, Concurrent Flow Control
-
The urbiscript operators for concurrency, tags.
-
Listing 14 — Event-based Programming
-
Support for event-driven concurrency in urbiscript.
-
Listing 15 — Urbi for ROS Users
-
How to use ROS from Urbi, and vice-versa.
paragraph III — Guidelines and Cook Books
This part contains guides to some specific aspects of Urbi SDK.
-
paragraph 16 — Installation
-
Complete instructions on how to install Urbi SDK.
-
Section 17 — Frequently Asked Questions
-
Some answers to common questions.
-
Section 18 — Urbi Guideline
-
Based on our own experience, and code that users have submitted to us, we suggest
a programming guideline for Urbi SDK.
-
Listing 19 — Migration from urbiscript 1 to urbiscript 2
-
This chapter is intended to people who want to migrate programs in urbiscript 1 to
urbiscript 2.
-
Listing 20 — Building Urbi SDK
-
Building Urbi SDK from the sources. How to install it, how to check it and so forth.
Section IV — Urbi SDK Reference Manual
This part defines the specifications of the urbiscript language. It defines the expected behavior
from the urbiscript interpreter, the standard library, and the SDK. It can be used to check
whether some code is valid, or browse urbiscript or C ++ API for a desired feature. Random
reading can also provide you with advanced knowledge or subtleties about some urbiscript
aspects.
This part is not an urbiscript tutorial; it is not structured in a progressive manner and is too
detailed. Think of it as a dictionary: one does not learn a foreign language by reading a
dictionary. For an urbiscript Tutorial, see Listing II.
This part does not aim at giving advanced programming techniques. Its only goal is to define the
language and its libraries.
-
Section 21 — Programs
-
Presentation and usage of the different tools available with the Urbi framework related
to urbiscript, such as the Urbi server, the command line client, umake, …
-
Section 22 — urbiscript Language Reference Manual
-
Core constructs of the language and their behavior.
-
Listing 23 — urbiscript Standard Library
-
Listing of all classes and methods provided in the standard library.
-
Section 24 — Communication with ROS
-
Urbi provides a set of tools to communicate with ROS (Robot Operating System).
For more information about ROS, see http://www.ros.org. Urbi, acting as a ROS
node, is able to interact with the ROS world.
-
Section 25 — Gostai Standard Robotics API
-
Also known as “The Urbi Naming Standard”: naming conventions in for standard
hardware/software devices and components implemented as UObject and the
corresponding slots/events to access them.
Listing V — Urbi Platforms
This part covers the specific features of Urbi for some of the platforms it was ported
to. Environments not described in this part are covered in separate, stand-alone,
documentations.
-
Listing 26 — Aldebaran Nao
-
Nao is a humanoid robot Nao from Aldebaran Robotics.
-
Listing 27 — Bioloid
-
Using the Bioloid robot construction kit with Urbi.
-
Listing 28 — Mindstorms NXT
-
LEGO Mindstorms NXT is a programmable robotics kit released by Lego in July
2006, replacing the first-generation LEGO Mindstorms kit. The kit consists of 519
Technic pieces, 3 servo motors, 4 sensors (ultrasonic, sound, touch, and light), 7
connection cables, a USB interface cable, and the NXT Intelligent Brick.
-
Section 29 — Gostai Open Jazz
-
Gostai Open Jazz is an entirely programmable robot. It is shipped with the Urbi
SDK to develop with Jazz.
-
Section 30 — Pioneer 3-DX
-
Pioneer 3-DX8 is an agile, versatile intelligent mobile robotic platform updated to
carry loads more robustly and to traverse sills more surely with high-performance
current management to provide power when it’s needed.
-
Section 31 — Segway RMP
-
The Segway Robotic Mobility Platform is a robotic platform based on the Segway
Personal Transporter.
-
Section 32 — Spykee
-
The Spykee is a WiFi-enabled robot built by Meccano (known as Erector in the
United States). It is equipped with a camera, speaker, microphone, and moves using
two tracks.
-
Listing 33 — Webots
-
Using Cyberbotics’ Webots simulation environment with Urbi.
paragraph VI — Tables and Indexes
This part contains material about the document itself.
-
paragraph 34 — Notations
-
Conventions used in the type-setting of this document.
-
Section 36 — Licenses
-
Licenses of components used in Urbi SDK.
-
Listing 35 — Release Notes
-
Release notes of Urbi SDK.
-
Section 37 — Glossary
-
Definition of the terms used in this document.