YARP and OpenAIR

From Wiki for iCub and Friends
Jump to: navigation, search

This page is intended as a seed for a comparison between YARP and OpenAIR, and an aid to mutual comprehension.

Summary of OpenAIR

OpenAIR is a routing and communication protocol based on a publish-subscribe architecture, built especially for A.I. research. It is intended to be the "glue" that allows numerous researchers to share code more effectively. At the abstract, it is the "post office and mail delivery system" for distributed, multi-module systems. AIR provides a core foundation upon which subsequent markup languages and semantics can be based, for e.g. gesture recognition and generation, computer vision, hardware-software interfacing etc; for an example see [CVML]. OpenAIR is an open specification of the [AIR protocol], released under a Creative Commons license, and there is [an open-source (BSD) implementation] of it in Java.

Goals are to:

  • Speed up progress in A.I. by:
    • Facilitating codesharing in A.I.
    • Enable easier construction and management of distributed systems (multiple computers)

Summary of YARP

YARP is aimed at researchers in robotics, particularly humanoid robotics, who find themselves with a complicated pile of hardware to control with an equally complicated pile of software. It offers:

  • Flexible and efficient communication mechanisms
  • Flexible and efficient device interfaces


  • Both desire to facilitate codesharing (OpenAIR targets A.I., YARP targets humanoid robotics)
  • Both address multiple-computer systems
  • Both address module-module communications
  • Both have open specifications of some kind
  • YARP is concerned with hardware device interfaces (OpenAIR does not)
  • OpenAIR runs on embedded platforms (WinCE, PocketPC, JavaME (phones))

Licensing issues:

  • OpenAIR is an open specification of the AIR protocol, released under a Creative Commons license.
  • There is an open-source (BSD) implementation of it in Java.
  • OpenAIR requires an AIR server and there is a free one, but no open-source ones
    • (could you clarify the distinction being made in the above two points?)
  • YARP is free and open source, under the GPL.

Message format:

  • OpenAIR uses XML, YARP does not
  • OpenAIR works with binary streams (soon part of spec)
  • YARP uses a format with both a binary and textual form of representation

Programming language issues:

  • OpenAIR has a native Java implementation
  • OpenAIR has a beta C# implementation
  • Both have a native C++ implementation
    • OpenAIR's is a binary linked library for Windows, OS X and Linux
    • YARP releases source code, at the time of writing there are no binary releases
  • YARP uses SWIG to support (so far) Python, Java, Perl, C#, Chicken, TCL. Other languages supported by SWIG should also work but are not tested.
  • YARP has a matlab interface, via Java and SWIG.

Cases where OpenAIR excels

The following features factor into many of OpenAIR's benefits:

  • Taking time directly into consideration
  • Making it very easy to mix discrete messages and streams
  • Having a simple built-in reconnect protocol

Cases where YARP excels

  • Interacting with hardware devices either locally or remotely.
  • Stream data efficiently, especially to multiple targets.
    • Example scenario: camera data that needs to be sent to every machine in a cluster -- very efficient using multicast protocol.