/Projects/Modules/JzURBI

URBI interface plug-in

JzURBI KR module is a direct interface to the URBI programming language interpreter developed by Gostai. JzURBI allows us to directly steer simulated as well as physical robots from Jazzyk.

The JzURBI module is used as a component of the Jazzbot project.

What is JzURBI?

In order to interface a Jazzyk program with robot’s body, the JzUrbi KR module integrates the URBI programming language interpreter. It connects over TCP/IP to an URBI server on the simulator’s side, or with the URBI robot controller that controls the robot’s body. The single query method query provide the agent program with the sensor information from the body. Jazzyk variables are treated the same way as in JzRuby, i.e. as global variables of the underlying URBI interpreter. Similarly, the single update method update simply sends the provided update formula, an URBI program, to the URBI server. The Urbibot connects over the JzUrbi module with the URBI server running in the Webots simulator and thereby steers the e-Puck robot, extended with a GPS sensor. In the particular case of the Urbibot, the sensory input accesses the following sensors: camera, distance sensor, GPS, touch-sensor and a light-sensor. Together with the update interface steering the Urbibot’s two wheels, these two methods provide the basic interface for e-Puck control.

Author

This KR module is being developed as a part of a diploma thesis of Bernd Fuhrmann, a master student at Department of Informatics of Clausthal University of Technology.

Example

The following example is taken from the Urbibot demo application. It demonstrates how the camera image from the JzURBI module is transfered to the JzRuby module for further processing (image analysis).

declare module urbi as urbi
declare module ruby as ruby

notify ruby on initialize [{
    require "base64" 
    time = 0;
}]
notify ruby on finalize [{
}]

notify urbi on initialize [{
        host=192.168.0.101
        port=54000
        buflen=2048 
        ---
}]

when query urbi (camrgb) [{
        var camrgb = "k";
        query << 1;
}] then update ruby (camrgb) [{
        #x = Base64.decode64($camrgb);
        newtime = Time.new.to_f;
        print 1/(newtime-time),"\n";
        time = newtime;

}]

Prerequisities

To properly use the JzURBI module, you need to install the GOSTAI URBI Remote SDK package.