5.13 Programming Webots controllers with URBI5.13.1 Introduction to URBIWhat is URBI ?URBI is the Universal Robotic Body Interface, developed by GOSTAI You can find more information about URBI on its community page. URBI is a simple yet powerful scripted language meant to be used as a convenient interface to real robots. URBI is designed to work as a client/server architecture, the robot being the server, and the actual controller being the client. However it is possible to make the client run on the same machine as the server, or to run URBI scripts directly on the server-side, without a client. URBI is not designed to write complex or computationally expensive controllers, but to provide useful time-oriented control mechanisms, thus allowing the user to easily write simple perception-action loops directly in URBI by abstracting away low-level hardware details. URBI for WebotsURBI for Webots is URBI server for Webots, meaning that it is an application, running as a Webots controller, which acts as a URBI server, whereas the program which actually controls your simulated robot is either a URBI script or a URBI client you have designed. It is easy to switch from the simulation to a real robot using the same URBI client or program. As of Webots 5.10.0, URBI for Webots is only implemented for the Windows and Linux version of Webots. Mac OS X versions of URBI for Webots is currently under development and will be integrated in upcoming versions of Webots. In this tutorial we will only focus on URBI script. Please refer to general URBI documentation to get familiar with URBI clients. It is strongly advised that you read the URBI language documentation and tutorial available here: http://www.gostai.com/doc.php. The basic use of URBI for Webots depends on:
Installation of URBI for WebotsTo install URBI for Webots on your computer, you must obtain the correct setup program for your operating system. A graphical installer is available for Windows. Debian packages and tarballs are available for Linux. The complete installation process is described in the URBI for Webots manual. 5.13.2 Running the examplesSimply open the kiki_urbi.wbt model in the worlds directory, and click on the play button. The kiki robot should zoom across the world, avoiding walls: a small, very simple to understand and modify, URBI script is actually running! Another more complex example is provided in the aibo_ers7_urbi_dance.wbt world: this script, written by Diego de Pardo, won the Sony Daft-Punk dance competition on a real Aibo robot. Finally, another model is provided in the aibo_ers7_urbi.wbt world to serve as a basis for your own Aibo simulations. 5.13.3 Kiki and URBITo learn more about URBI for Webots, we shall take a closer look at the kiki robot programmed with an URBI script. First, open the world kiki_urbi.wbt in the URBI world directory (located by default in the projects / packages / urbi / worlds subdirectory of your Webots directory). Now open a telnet connection to localhost on port 54000 (the standart URBI port) and type the following:
Try it, and next time the robot gets close to a wall it will simply bump into it. Now type stop circle; to stop it and type the following:
Now, type stop wave; to stop all movement. 5.13.4 Going furtherNote: As you experiment with URBI for Webots, keep in mind that when you stop the Webots simulation, it also suspends the associated controllers, hence it suspends the URBI server, so that your telnet session will not respond until you press play again to start the simulation. To have a closer look at how URBI for Webots works, go to the data / kiki directory and open the following files with your favorite text editor:
You can now start to create your own scripts and load them from the URBI.INI file. 5.13.5 Create you own URBI based controllerTo handle each robot's set of specific features, Webots uses a set of devices which is fully supported by URBI for Webots. Please read the official URBI for Webots documentation to learn more. Have fun with URBI! ![]() ^ page top ^ |
| E-mail to webmaster | Last updated: | Copyright © 2008 Cyberbotics Ltd. |