Skip to content

Commit

Permalink
Merge branch 'master' of github.com:airalab/aira
Browse files Browse the repository at this point in the history
  • Loading branch information
akru committed Oct 26, 2018
2 parents 1e011b8 + 87cc7a4 commit 5f519d8
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 55 deletions.
56 changes: 21 additions & 35 deletions docs/basic_usage.rst
Original file line number Diff line number Diff line change
@@ -1,33 +1,25 @@
Basic Usage
===========

To get familiar with AIRA, let's see what is under hood.
To get familiar with AIRA, let's see what is under the hood.

When you launch the client several ros nodes are started. Here's a list of robonomics communication stack nodes::
Once you launch the client several ros nodes will already be on the run. Here's a list of robonomics communication stack nodes::

$ rosnode list
/liability/executor
/liability/infochan/channel
/liability/infochan/signer
/liability/listener
/lighthouse/infochan/channel
/lighthouse/infochan/signer
/lighthouse/lighthouse
/lighthouse/matcher
/lighthouse/xrt/erc20_token
/rosout

There are two the same node under different namespaces: ``/liablity/infochan`` and ``/lighthouse/infochan``. We will describe the first one, the other one works in the same way.

* ``/liability/executor`` - gets rosbag file from IPFS and plays it
* ``/liability/infochan/channel`` - responsible for offer, demand and result messages. It retrieves messages from the channel and sends signed messages to the one
* ``/liability/infochan/signer`` - offers services for signing our offer, demand and result messages
* ``/liability/listener`` - watches for new liability contracts. When the event is received the node calls executor node
* ``/lighthouse/lighthouse`` - responsible for creating new liability contract and finalizing it
* ``/lighthouse/matcher`` - keeps track of all incoming offers and demands. If there's a match, calls lighthouse to create a liability
* ``/lighthouse/xrt/erc20_token`` - offers several services to work with ERC-20 tokens
* ``/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
.. * ``/liability/listener`` - watches for new liability contracts. When the event is received the node calls executor node
.. * ``/lighthouse/lighthouse`` - responsible for creating new liability contract and finalizing it
* ``/lighthouse/matcher`` - keeps track of all incoming offers and demands. If there's a match, calls lighthouse to create a liability
* ``/lighthouse/xrt/erc20_token`` - offers several services to work with ERC-20 tokens
And here's a list of robonomics stack topics. We skipped repetitive topics in ``/liability/infochan`` part.
And here's a list of robonomics stack topics.

.. code-block:: bash
Expand All @@ -36,34 +28,28 @@ And here's a list of robonomics stack topics. We skipped repetitive topics in ``
/liability/current
/liability/incoming
/liability/infochan/incoming/ask
...
/liability/infochan/incoming/bid
/liability/infochan/incoming/result
/liability/infochan/sending/ask
/liability/infochan/sending/bid
/liability/infochan/sending/result
/liability/infochan/signing/ask
/liability/infochan/signing/bid
/liability/infochan/signing/result
/liability/result
/lighthouse/deal
/lighthouse/infochan/incoming/ask
/lighthouse/infochan/incoming/bid
/lighthouse/infochan/incoming/result
/lighthouse/infochan/sending/ask
/lighthouse/infochan/sending/bid
/lighthouse/infochan/sending/result
/lighthouse/infochan/signing/ask
/lighthouse/infochan/signing/bid
/lighthouse/infochan/signing/result
/lighthouse/xrt/event/approval
/lighthouse/xrt/event/transfer
/rosout
/rosout_agg
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`` - when a cyber-physical system finishes its job it has to publish a log file to IPFS. But don't publish a result directly to this topic! Use a service instead
* ``/lighthouse/infochan/incoming/*`` - when a CPS needs information about offer, demand or result, it subscribes on corresponding topic
* ``/lighthouse/infochan/signing/*`` - when a CPS needs to send offer, demand or result, it publishes to corresponding topic
* ``/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

Often introduction to a new technology begins with a greeting. Let's say hello to AIRA!
Let's start with greetings - say hello to AIRA!

All you have to do is launch a preinstalled package ``hello_aira``::
You should just launch a preinstalled package ``hello_aira``::

$ rosrun hello_aira hello_aira

Expand Down
12 changes: 6 additions & 6 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ Main Airalab repositories

Please choose a corresponding repository for reporting an issue!

Did you find a bug?
Found a bug?
~~~~~~~~~~~~~~~~~~~

* **Ensure the bug was not already reported** by searching on GitHub under `Issues <https://github.com/airalab/aira/issues>`_.
* **Make sure the bug was not already reported** - check GitHub `Issues <https://github.com/airalab/aira/issues>`_.

* If you're unable to find an open issue addressing the problem, `open a new one <https://github.com/airalab/aira/issues/new>`_. Be sure to include a **title and clear description**, as much relevant information as possible.
* If there is no open issue addressing the problem, `open a new one <https://github.com/airalab/aira/issues/new>`_. Be sure to include a **title and clear description**, as much relevant information as possible.

Also you can open an issue if you have a proposal for an improvements.
Also, you can open an issue if you have a proposal for improvements.

Did you write a patch that fixes a bug?
Wrote a patch that fixes a bug?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* Open a new GitHub pull request with the patch.

* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
* Make sure the PR description clearly describes the problem and the solution. Include the relevant issue number if applicable.

**Please don't fix whitespace, format code, or make a purely cosmetic patch**

Expand Down
2 changes: 2 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Frequently Asked Questions
How to see logs from main services?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. TODO lighthouse
Parity and IPFS in real time:

.. code-block:: bash
Expand Down
21 changes: 8 additions & 13 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Overview
:align: center
:scale: 50 %

AIRA (Autonomous Intelligent Robot Agent) project implements the standard of economic interaction between human-robot and robot-robot via liability smart contract. AIRA makes it possible to connect a variety of different robots to the market of robots' liabilities existing on Ethereum for the direct sale of data from robot sensors, ordering of logistics services, and organization ordering of personalized products at fully automated enterprises.
AIRA (Autonomous Intelligent Robot Agent) project implements the standard of economic interaction between human-robot and robot-robot via liability smart contract. AIRA makes it possible to connect a variety of different robots to the market of robot liabilities existing on Ethereum for the direct sale of data from robot sensors, ordering of logistics services, and organization ordering of personalized products at fully automated enterprises.

Useful links
------------
Expand All @@ -19,36 +19,31 @@ Useful links
Quick Start
-----------

The first thing to do is to get the last image of AIRA. You can find one `here <https://github.com/airalab/aira/releases>`_.
The first thing to do is to get the last image of AIRA. You can find it `here <https://github.com/airalab/aira/releases>`_.

.. image:: img/1.png
:alt: Get AIRA

AIRA's distributed as virtual machine image. To launch the client you need to import .ova file to VirtualBox. There's a convenient ``Ctrl+I`` shortcut.
AIRA is distributed as virtual machine image. To launch the client you need to import .ova file to VirtualBox. You can use a convenient ``Ctrl+I`` shortcut.

It's recommended to set:

* RAM to 2Gb at least
* Network to Bridge
* At least 40 Gb SSD

When the image is imported, launch the machine. Wait some time until Ethereum node is fully synchronized and AIRA client is ready to work!
When the image is imported, launch the machine. Wait until Ethereum node is fully synchronized and then AIRA client is ready to work!
AIRA creates a new address for you, it's located here::

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

Or you can call a service::
If you need to export an account, .json file is in ``/var/lib/parity/.local/share/io.parity.ethereum/keys/`` directory.

rosservice call /lighthouse/xrt/accounts
There are some helpful commands on `FAQ <faq.html>`_ page.

To become familiar with AIRA distributive we can, for example we can listen to ``/liability/infochan/incoming/ask``::

if you need to export an account, .json file is in ``/var/lib/parity/.local/share/io.parity.ethereum/keys/`` directory.

Some helpful commands can be found on `FAQ <faq.html>`_ page.

At this point there's not a lot we can do. For example we can listen to ``/lighthouse/infochan/incoming/ask``::

rostopic echo /lighthouse/infochan/incoming/ask
rostopic echo /liability/infochan/incoming/ask

.. image:: img/2.png
:alt: Check messages
Binary file modified docs/img/2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5f519d8

Please sign in to comment.