Components and liburbi

Extending URBI with code written in C++, Java or Matlab that will be made available to your URBI scripts can be done in two different ways. The first way it to use one of the liburbi flavor for your preferred language (C++/Java/Matlab) and build a software client. That is what we are going to describe in this chapter.

The second option, which is more powerful and described in the chapter "Create components: the UObject architecture" is to create a UObject Component which refers to an object in C++, accessible like any other URBI object from your URBI programs, sharing methods and object attributes. It is the most portable and flexible way of adding functionalities to URBI by mirroring objects, but let's start with the basic liburbi. One of the interest of liburbi is also that it is available for with many more language (the object binding is not always possible otherwise and is currently limited to C++), and in any case, knowing the liburbi approach is a good idea, since it might be more suited to your need in certain cases and it gives a good introduction to asynchronous programming.

There is currently a C++, Matlab, Java and Python version of liburbi if you want to control your robot using C++, Matlab, Java or Python, and a liburbi-OPENR version if you want to recompile a liburbi-C++ based program to let it run on the Aibo, as an OPENR object (in that case, your robot will remain completely autonomous). However, we strongly suggest to abandon the OPENR version and switch to the UObject architecture to embed components in the Aibo. This only interest of this OPENR version is that it allows to have a sort of implicit non-blocking thread, which is otherwise impossible with the Aperios operating system from Sony.

We will not describe all the liburbi implementations here but only the C++ version, which gives the general ideas. Other versions are similar and have a specific documentation. We assume in the following that you have a basic understanding of C++. If not, please refer to a simple C++ tutorial, since the notion developed here will remain basic.