Robots

Custom

How to adapt Urbi to my robot?

There are four main steps to adapt Urbi to your particular robot:

1. Download and install Urbi

Check if your processor and OS are listed among the existing supported platforms, and if so try to download the binary version. Depending on the toolchain you use, this could work and you could go directly to the next step.

If your environment is not supported, the other option is to compile Urbi by yourself. Get the source version and follow the readme to learn how to compile it.

2. Create the UObject drivers for your specific hardware

Once you have installed a running version of Urbi on your system, you need to build C++ UObject "drivers" to your underlying hardware. The good practice is to have one UObject per degree of freedom or sensor value.

For example, you can define one generic 'motor' UObject class that you instantiate for every specific motor of your robot. Something like that:

headYaw = motor.new("headyawID");
headTilt = motor.new("headTiltID");

A driver UObject will typically have a .val slot to give access to the underlying value that it is associated with.

For a detailed tutorial on how to design UObject drivers, check here. Many standard low level interfaces, like serial ports or CAN buses, are already available here and should cover most of your needs in typical hardware.

3. Make your robot compliant with the Gostai Standard API

There are many ways to name the UObject drivers and their corresponding interface. For example, a motor could be called "motor", "leg", "limp" or "jambe" depending on your language and your point of view. To make it uniform, we have tried to create a complete guideline on how to name things. It's not better than another one, but it exists and gives a convention. It is called the Gostai Standard API. You will find common practices of naming arms, legs, wheels, cameras, etc, and their corresponding API.

You should make your robot compliant with this guideline:

  • Implement one or more of the standard interfaces in each UObject.
  • Use the provided Component and Interface urbiscript classes to create the robot's component hierarchy.

The benefit of doing so is to have a robot that is immediately compatible with other similar robots, and the possibility to exchange and reuse urbiscript code in the community.

4. Share your work with others

Once you have a working and compliant Urbi engine for your particular robot, it is a good idea to start a dedicated wiki page on Urbiforge. Please post a message in the contrib forum and we will grant you the access, so that you could create your own pages, add videos, install instructions or do whatever you want to share with others!

Options: