Not long ago, the Robonomics network architect, Sergey Lonshakov, announced the first online Robonomics Winter School. We will suggest participants to go through a 15-day training program, after which everyone will build their own sensor network (details can be found here). As a community support assistant of Airalab team, I will publish a series of “cheat sheets” for the future participants. You have a unique opportunity to look through the online-school program in advance, and also to improve it with the help of your comments and remarks — you can write here.

Introduction

*to go to the essence — scroll down.

Airalab R&D team provides technologies in order to connect Smart Сities and Industry 4.0 with Blockchain. Robonomics network will allow combining cyber-physical systems (CPSs) using a market mechanism, which in turn will provide an opportunity to realize a planetary system of mass production of goods and services directly integrated into the social economy. AIRA (Autonomous Intelligent Robot Agent) is a Robonomics network client that helps engineers to design smart cities and light-out factories using robots as a services in Industry 4.0. In this article we will get acquainted with AIRA from the practical point, in particular, we will try to setup AIRA image and test basic functions.

The Essence

Let’s start. AIRA image is deployed on a virtual machine (VM). So if you don’t have the VM on your laptop, download and set it up. Then you should download the latest AIRA version from GitHub.

To run the client, you should import .ove format file in VirtualBox:

As you can see from the picture above, you can use Ctrl+I to import.

After import is finished launch the VM. Right after the Ethereum node is sync, AIRA client is ready for work. AIRA creates a new address for you, it is situated here:

/var/lib/parity/foundation-env.sh

.json file with your account you can find here:

/var/lib/parity/.local/share/io.parity.ethereum/keys/ Why do you need this address? This address is used for singing all messages, also it is an unique identifier of a network agent.

First, let’s try to listen to the channel:

rostopic echo /liability/infochan/incoming/ask We use the ipfs broadcast channel for messaging because it is

fast, convenient and free. What does it mean to listen to the channel? To

listen to the channel means to see the message sent to it, and thus understand

that the channel is “alive”. You can only listen to the messages that are sent

to the channel after the rostopic echo command is launched. The work of network is built on messaging with the network, so to understand the process it is useful to get a message, see how information is transmitted, what are the

fields in the message. Read more about the meaning of the fields in one of the

following publications.

Basic usage

Once you launch the client several ros nodes will already be on the run*. To see the list of robonomics communication stack nodes use rosnode list:

*It means that there are already all necessary interfaces for Robonomics network.

· /liability/executor — gets rosbag file from IPFS and plays it.

· /liability/infochan/channel — is responsible for offer, demand and result messages. It catches messages from the channel and sends signed messages back.

· /liability/infochan/signer — offers services for signing offer, demand and result messages.

To see the list of robonomics stack topics use rostopic list:

The most important topics for us are:

/liability/incoming — when a new liability is created, this topic publishes Ethereum address of the contract;

/liability/result — this topic is for publishing results. But don’t publish a result directly to this topic! Use a service instead;

/liability/infochan/incoming/* — a CPS gets information about offer, demand or result from corresponding topics;

/liability/infochan/signing/* — a CPS sends offer, demand or result messages to corresponding topics.

Now when we know AIRA basic functions, let’s say hello to AIRA.

You should just launch a preinstalled package hello_aira using rosrun hello_aira hello_aira.

We’ve launched our agent. It will wait for a demand message. Go to dapp and press Order:

Now go back to the console and see the result:

Through this lesson, we learned about AIRA and its basic functions, which will be useful for performing the following tasks of the Winter School and building a sensor network. Subscribe to the blog, join the chat of the future students of Robonomics — let’s study together :)