URBI
Encyclopedia
Urbi is an open source cross-platform
software platform in C++ used to develop applications for robotics and complex systems. Urbi is based on the UObject distributed C++ component architecture. It also includes the urbiscript
orchestration language which is a parallel and event-driven script language. UObject components can be plugged into urbiscript and appear as native objects that can be scripted to specify their interactions and data exchanges. UObjects can be linked to the urbiscript interpreter, or executed as autonomous processes in "remote" mode.
The urbiscript language can be best described as an orchestration script language: like Lua in video games, urbiscript can be used to glue together C++ components into a functional behavior, the CPU-intensive algorithmic part being left to C++ and the behavior scripting part being left to the script language which is more flexible, easy to maintain and allows dynamic interaction during program execution. As an orchestration language, urbiscript also brings some useful abstractions to the programmer by having parallelism
and event-based programming as part of the language semantics. The scripting of parallel behaviors and reactions to events are core requirements of most robotic and complex AI applications, therefore urbiscript (and the whole Urbi platform) is well suited to these applications.
whenever (ball.visible)
{
headYaw.val += camera.xfov * ball.x
&
headPitch.val += camera.yfov * ball.y
};
whenever is used to trigger a piece of code in loops as long as the associated condition is true. The "&" sign is used to specify that both commands should start at the same time, thus running in parallel.
Other notable event-driven constructs include at, which triggers the associated code once, at the time when the condition becomes true:
at (speech.hear("hello"))
{
voice.say("How are you?") &
robot.standup;
}
Every command or group of commands is taggable, which provides a way to stop it later if needed:
myTag:
while(true)
echo ("This is a never ending loop"),
at (button.pressed)
myTag.stop;
Note in the example above the comma at the end of the command. It will put the preceding command in background, allowing the flow execution to carry on, in particular the next 'at' command to be executed.
UObject uses C++ templates to transparently map any requested method to an interface machinery that takes care of the type checking.
A C++ UObject can be used in plugged mode if it is directly linked to the URBI Engine at compile time or with dynamic loading. In that case, the C++ object shares the Urbi Kernel memory directly, resulting in efficient integration. This is typically used for time critical components like motor or sensor drivers. The same C++ UObject can also be used without modifications as a remote component. In that case, it will become an autonomous program to be executed with the IP address of the Urbi server as a parameter. In both cases, the object will transparently appear in urbiscript as a native urbiscript object.
Free GPL components developed by the community can be found and exchanged on the urbiforge community website of URBI.
is the official robot simulator compatible with Urbi.
Integration with Player/Stage
has been reported, although it is not currently released.
Announced:
Choregraphe is a platform for NAO using Python and also URBI languages.
Cross-platform
In computing, cross-platform, or multi-platform, is an attribute conferred to computer software or computing methods and concepts that are implemented and inter-operate on multiple computer platforms...
software platform in C++ used to develop applications for robotics and complex systems. Urbi is based on the UObject distributed C++ component architecture. It also includes the urbiscript
Urbiscript
urbiscript is a programming language for robotics. It features syntactic support for concurrency and event-based programming. It is a prototype-based object-oriented scripting language...
orchestration language which is a parallel and event-driven script language. UObject components can be plugged into urbiscript and appear as native objects that can be scripted to specify their interactions and data exchanges. UObjects can be linked to the urbiscript interpreter, or executed as autonomous processes in "remote" mode.
The urbiscript Language
The urbiscript language has been developed since 2003 by Jean-Christophe Baillie in the Cognitive Robotics Lab of ENSTA, Paris. It is now actively and further developed in the industry through the Gostai company founded in 2006.The urbiscript language can be best described as an orchestration script language: like Lua in video games, urbiscript can be used to glue together C++ components into a functional behavior, the CPU-intensive algorithmic part being left to C++ and the behavior scripting part being left to the script language which is more flexible, easy to maintain and allows dynamic interaction during program execution. As an orchestration language, urbiscript also brings some useful abstractions to the programmer by having parallelism
Parallel computing
Parallel computing is a form of computation in which many calculations are carried out simultaneously, operating on the principle that large problems can often be divided into smaller ones, which are then solved concurrently . There are several different forms of parallel computing: bit-level,...
and event-based programming as part of the language semantics. The scripting of parallel behaviors and reactions to events are core requirements of most robotic and complex AI applications, therefore urbiscript (and the whole Urbi platform) is well suited to these applications.
Language attributes
- Parallelism and event-based programming
- Prototype-based programmingPrototype-based programmingPrototype-based programming is a style of object-oriented programming in which classes are not present, and behavior reuse is performed via a process of cloning existing objects that serve as prototypes. This model can also be known as classless, prototype-oriented or instance-based programming...
- C++ like syntax
- C++ based component architecture (UObject) with possibility to link objects or run them remotely
- Client/Server based architecture
- Client interfaces with Java and Matlab (Urbi SDK)
- Cross platform: Linux, Mac, Windows and others. Embeddable, URBI can run on various processors: x86, ARM, mips, powerPC, etc.
- Taggable commands for execution flow control
Pros
- Urbi is now open source with a GPL compatible license (GNU AGPL v3) since May 2010.
- Urbi is interoperable with Willow Garage's ROSROS (Robot Operating System)Robot Operating System is a software framework for robot software development, providing operating system-like functionality on a heterogenous computer cluster. ROS was originally developed in 2007 under the name switchyard by the Stanford Artificial Intelligence Laboratory in support of the...
. - Supported by a company if support is needed, frequent releases, and a core dev team.
Cons
- Urbi can be used as a simple C++ middleware, without urbiscript. However, using urbiscript requires learning a relatively new language, not so much in term of syntax (which is C-like), but rather in terms of parallel/event-based programming paradigm.
- The WebotsWebotsWebots is a professional robot simulator widely used for educational purposes.The Webots project started in 1996, initially developed by Dr. Olivier Michel at the Swiss Federal Institute of Technology in Lausanne, Switzerland....
professional robot simulator, which can run Urbi, is expensive (990€ Pro, 190€ Edu) . - Software for visual robot control Gostai Studio and Gostai Lab are proprietary and not free.
Examples
The example below shows how to write a ball tracking action/perception loop in urbiscript: headYaw/headPitch are two motor objects, and ball is the ball detection object (x and y range from -1/2 to 1/2):whenever (ball.visible)
{
headYaw.val += camera.xfov * ball.x
&
headPitch.val += camera.yfov * ball.y
};
whenever is used to trigger a piece of code in loops as long as the associated condition is true. The "&" sign is used to specify that both commands should start at the same time, thus running in parallel.
Other notable event-driven constructs include at, which triggers the associated code once, at the time when the condition becomes true:
at (speech.hear("hello"))
{
voice.say("How are you?") &
robot.standup;
}
Every command or group of commands is taggable, which provides a way to stop it later if needed:
myTag:
while(true)
echo ("This is a never ending loop"),
at (button.pressed)
myTag.stop;
Note in the example above the comma at the end of the command. It will put the preceding command in background, allowing the flow execution to carry on, in particular the next 'at' command to be executed.
UObject component architecture
The UObject component architecture, currently based on the C++ UObject library, allows developers to interface any C++ object within Urbi, making selected methods and attributes visible in the script language, while in fact being C++ code. Special notifiers can be set on any of the object's attributes to notify the C++ side of any change on these attributes on the urbiscript/Urbi side.UObject uses C++ templates to transparently map any requested method to an interface machinery that takes care of the type checking.
A C++ UObject can be used in plugged mode if it is directly linked to the URBI Engine at compile time or with dynamic loading. In that case, the C++ object shares the Urbi Kernel memory directly, resulting in efficient integration. This is typically used for time critical components like motor or sensor drivers. The same C++ UObject can also be used without modifications as a remote component. In that case, it will become an autonomous program to be executed with the IP address of the Urbi server as a parameter. In both cases, the object will transparently appear in urbiscript as a native urbiscript object.
Components for Robotics: speech, face/object detection, SLAM
Gostai has several plug & play UObject components useful for robotics:- voice recognition
- voice synthesis
- face detection (including a bridge with OpenCVOpenCVOpenCV is a library of programming functions mainly aimed at real time computer vision, developed by Intel and now supported by Willow Garage. It is free for use under the open source BSD license. The library is cross-platform. It focuses mainly on real-time image processing...
) - face recognition
- SLAMSimultaneous localization and mappingSimultaneous localization and mapping is a technique used by robots and autonomous vehicles to build up a map within an unknown environment , or to update a map within a known environment , while at the same time keeping track of their current location.- Operational definition :Maps are used...
- color blob detection
- SIFT based object recognition
Free GPL components developed by the community can be found and exchanged on the urbiforge community website of URBI.
Robotics simulators compatible with Urbi
WebotsWebots
Webots is a professional robot simulator widely used for educational purposes.The Webots project started in 1996, initially developed by Dr. Olivier Michel at the Swiss Federal Institute of Technology in Lausanne, Switzerland....
is the official robot simulator compatible with Urbi.
Integration with Player/Stage
Player Project
The Player Project is a project to create free software for research into robotics and sensor systems . Its components include the Player network server and Stage and Gazebo robot platform simulators...
has been reported, although it is not currently released.
"Urbi-fied" robots & simulators
Released:- WebotsWebotsWebots is a professional robot simulator widely used for educational purposes.The Webots project started in 1996, initially developed by Dr. Olivier Michel at the Swiss Federal Institute of Technology in Lausanne, Switzerland....
- SegwaySegway PTThe Segway PT is a two-wheeled, self-balancing transportation machine invented by Dean Kamen. It is produced by Segway Inc. of New Hampshire, USA. The name "Segway" is a homophone of "segue" while "PT" denotes personal transporter....
- Aibo ERS7/ERS2xx (Urbi 1.x only)
- iRobot CreateIRobot CreateiRobot Create is a hobbyist robot manufactured by iRobot that is based on the Roomba platform and was introduced in 2007. However, iRobot Create is explicitly designed for robotics development, rather than simply hacking the Roomba...
- Lego Mindstorms NXTLego Mindstorms NXTLego Mindstorms NXT is a programmable robotics kit released by Lego in late July 2006.It replaced the first-generation Lego Mindstorms kit, which was called the Robotics Invention System. The base kit ships in two versions: the Retail Version and the Education Base Set . It comes with the NXT-G...
http://www.gostai.com/nxt - HRP-2 (restricted release to members of JRL)
- NaoNao (robot)Nao is an autonomous, programmable, medium-sized humanoid robot, developed by Aldebaran Robotics, a French startup company headquartered in Paris. Project Nao was launched in 2004. On August 15, 2007, Nao replaced Sony's robot dog Aibo as the robot used in the Robot Soccer World Cup Standard...
- Robotis BioloidRobotis BioloidThe Robotis Bioloid is a hobbyist and educational robot kit produced by the Korean robot manufacturer Robotis. The Bioloid platform consists of components and small, modular servomechanisms called Dynamixels, which can be used in a daisy-chained fashion to construct robots of various...
- Mobile Robots Pioneer
Announced:
- Surveyor
- Khepera IIIKhepera mobile robotThe Khepera is a small differential wheeled mobile robot that was developed at the LAMI laboratory of Prof. Jean-Daniel Nicoud at EPFL in the mid '90s. It was developed by Edo...
- e-puck
Development environments
Urbi comes with Gostai Studio that integrates a behavior editor to graphically create finite state machines whose states are simple urbiscript programs, and GUI builder to design interfaces with drag and drop support. Gostai Studio is cross-platform and generates freely usable urbiscript code as an output.Choregraphe is a platform for NAO using Python and also URBI languages.
See also
- Robotics suiteRobotics suiteA robotics suite is a visual environment for robot control and simulation. They are typically an end-to-end platform for robotics development and include tools for visual programming and creating and debugging robot applications...
- Player ProjectPlayer ProjectThe Player Project is a project to create free software for research into robotics and sensor systems . Its components include the Player network server and Stage and Gazebo robot platform simulators...
- open sourceOpen sourceThe term open source describes practices in production and development that promote access to the end product's source materials. Some consider open source a philosophy, others consider it a pragmatic methodology...
robot interface in research and post-secondary education - ROS (Willow Garage)ROS (Robot Operating System)Robot Operating System is a software framework for robot software development, providing operating system-like functionality on a heterogenous computer cluster. ROS was originally developed in 2007 under the name switchyard by the Stanford Artificial Intelligence Laboratory in support of the...
External links
- Urbi Online documentation
- urbiscript Tutorial
- UObject Tutorial
- Videos
- Wong, William, "Gostai Urbi", "Electronic Design", August 05, 2010.
- McCafferty, Billy, "Q&A of Urbi, a robot OS", "Sharprobotica", July 16, 2010.
- Blankenhorn, Dana, "I, open source robot", "ZDNet", August 20, 2010.