Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/airalab/robonomics

Robonomics node implementation for Polkadot ecosystem. Kusama Parachain slot '2048' since January'2022.
https://github.com/airalab/robonomics

iot polkadot robotics rust substrate

Last synced: 3 months ago
JSON representation

Robonomics node implementation for Polkadot ecosystem. Kusama Parachain slot '2048' since January'2022.

Lists

README

        

= Robonomics

image:https://github.com/airalab/robonomics/blob/master/web3_foundation_grants_badge_black.jpg["Web3 Foundation Grants — Wave Two Recipient", link="https://medium.com/web3foundation/web3-foundation-grants-wave-two-recipients-16d9b996501d"]

:Author: Robonomics Network Developers
:Revision: 0.5.0
:toc:
:sectnums:

image:https://img.shields.io/github/license/airalab/robonomics["License", link="https://github.com/airalab/robonomics/blob/master/LICENSE"]
image:https://github.com/airalab/robonomics/workflows/Testing/badge.svg?branch=master["CI Status", link="https://github.com/airalab/robonomics/actions"]
image:https://img.shields.io/github/release/airalab/robonomics.svg["Release", link="https://github.com/airalab/robonomics/releases"]
image:https://img.shields.io/github/downloads/airalab/robonomics/total.svg["Downloads", link="https://github.com/airalab/robonomics/releases"]
image:https://img.shields.io/matrix/robonomics:matrix.org["Matrix", link="https://matrix.to/#/#robonomics:matrix.org"]

> Implementation of a https://robonomics.network node in Rust, based on the https://substrate.dev[Substrate framework].

This repo contains runtimes for the Earth Parachain, Mars Parachain, and Robonomics Relay chain networks. The README provides information about installing the robonomics binary and developing on the codebase. For more specific guides, like how to be a node, see the https://wiki.robonomics.network[Robonomics Wiki].

Robonomics platform includes a set of open-source packages and infrastructure for Robotics, Smart Cities and Industry 4.0 developers.

== Try it out

. https://get.robonomics.network[Get Node] and/or https://parachain.robonomics.network[Open Portal].
. Run the https://wiki.robonomics.network/docs/playground-overview/[Robonomics Playground].

== The Robonomics Crates

Structure of **Robonomics** followed:

- **Robonomics Node** - substrate-based blockchain node with Robonomics Network extensions.
- **Robonomics CLI** - console line primitives that make framework functions runnable.
- **Robonomics IO** - stream-oriented library with support general set of sensors and actuators (including virtual devices like PubSub or stdin/stdout) that makes hardware interaction easy.
- **Robonomics Protocol** - network library that helps to build P2P communication in Industry 4.0 and Smart City cases.
- **Robonomics Frame** - a collection of pallets suitable for Smart City and Industry 4.0 cases.

Full docs available at https://crates.robonomics.network.

== Building from source

Ensure you have Rust and the support software installed:

[source, shell]
----
curl https://sh.rustup.rs -sSf | sh
# on Windows download and run rustup-init.exe
# from https://rustup.rs instead
rustup target add wasm32-unknown-unknown --toolchain nightly
----
[source, shell]
----
In case of error: toolchain 'nightly-x86_64-unknown-linux-gnu' is not installed
rustup toolchain install nightly
----

You will also need to install the following packages:

. Linux:
[source, shell]
sudo apt install cmake git clang libclang-dev protobuf-compiler

. Mac:
[source, shell]
brew install cmake pkg-config git llvm

. Windows (PowerShell):
+
[source, shell]
----
# Install LLVM
# Download and install the Pre Build Windows binaries
# of LLVM from http://releases.llvm.org/download.html
----

Install robonomics node from git source.

[source, shell]
cargo install --force --git https://github.com/airalab/robonomics --tag v1.0.0 robonomics-node

And then launch full node of robonomics testnet parachain.

[source, shell]
robonomics

Or run your local development network.

[source, shell]
robonomics --dev

=== Building with Nix

. Install Nix package manager:
[source, shell]
curl https://nixos.org/nix/install | sh

. Run in Nix shell:
+
[source, shell]
----
git clone --recursive https://github.com/airalab/robonomics && cd robonomics
nix-shell --run "cargo run --release"
----

== Network maintaining

Currently Robonomics is maintained by developers but anyone can https://www.robonomics.events/#/collators[support the project].
Every additional full node of blockchain helps it to be more sustainable and fault tolerant.
Robonomics node binaries is available in https://github.com/airalab/robonomics/releases[release] assets
or it could be <>.

=== Gatekeepers updates

* Release: image:https://img.shields.io/github/release/airalab/robonomics.svg["Release", link="https://github.com/airalab/robonomics/releases"]
* Telemetry: https://telemetry.parachain.robonomics.network/#list/RobonomicsEarth

Launch command:
[source, shell]
----
robonomics --validator --parachain-id 1000 --collator-eth-account
----

== Robonomics I/O

Especially to make hardware interaction easy we introduce https://crates.robonomics.network/robonomics_io/index.html[robonomics_io] crate. This crate implements two kinds of devices: `source` - device that intended to read a data and `sink` - device that intended to write data. This approach suits the pipelines paradigm well and implemented in Robonomics CLI as `io` subcommand.

```
$ robonomics io
robonomics-io 0.25.1
Run I/O actions using Robonomics Framework.

USAGE:
robonomics io [FLAGS] [OPTIONS]

SUBCOMMANDS:
help Prints this message or the help of the given subcommand(s)
read Read information from device
write Write information into device
```

For example, the sentence that simple read value from Nova SDS011 sensor is followed.

```bash
$ robonomics io read sds011
{"timestamp":"1588090281","pm25":0.5,"pm10":1.5}
```

Is it also possible to combine IO actions to get something useful.
Following sentence reads JSON values from a sensor and publishes it into `my-sensor-data` topic.

```bash
$ robonomics io read sds011 | robonomics io write pubsub my-sensor-data
```

Read https://wiki.robonomics.network/docs/rio-overview/[full guide on wiki].

== Robotics integration

Of course, Robonomics should integrate open-source robotics, our main target is http://www.ros.org[ROS]-enabled robots.
The node implements a few features to make robotics integration as easy as it possible.

=== Building with ROS feature

. Install ROS using http://wiki.ros.org/melodic/Installation[instruction].

. Import ROS environment:
[source, shell]
source /opt/ros/melodic/setup.bash

. Build with `ros` feature:
[source, shell]
cd bin/node && cargo build --release --features ros

=== Examples

Available examples are in https://github.com/airalab/robonomics/tree/master/examples[this directory].

==== Curiosity Rover under Robonomics control

Simple but yet a complete sample of Robonomics `launch` and `datalog` functions.
You can find full documentation on https://wiki.robonomics.network/docs/connect-mars-curiosity-rover-under-robonomics-parachain-control/[Robonomics Wiki].