Giter Club home page Giter Club logo

uhura's Introduction

Uhura: A Software Framework for Swarm Management in Multi-Radio Robotic Networks

Swarm Networking System

Uhura facilitates communication both within an aerial swarm and between the swarm and ground devices, regardless of the multiple M2M communication technologies used. It includes a core module, known as the Uhura Core, which dynamically selects the most suitable adapter for each link based on the QoS needs of the application. The Uhura Adapter provides an abstraction layer for managing multiple M2M communication stacks.

In this project, some M2M technologies like BLE Mesh, socket, and XBee were tested. Also, since a classical scenario in the robotics field involves multiple Wi-Fi modules, Uhura is a good candidate for having just one high-level input/output layer.

The framework uses a pub/sub paradigm over NATS.io and is written mainly in TypeScript/JavaScript on Node.js.

The core and the adapters exchange data using Protobuf as a neutral structure. At the moment, there is no dedicated Uhura client, but it can be replicated using a NATS client and a Protobuf implementation, and then pub/sub on the two main topics:

  • UHURA_ID.sendMessage.binary: where binary data can be published like a Protobuf
  • UHURA_ID.receivedMessage.binary: where generic data is received like a Protobuf

In case of non-structured data, UHURA_ID.sendMessage.text and UHURA_ID.receivedMessage.text can be used to easily show plain text.

The library demonstrates the possibility of creating custom adapters for M2M not easily integrated into conventional systems. Since NATS has several clients, and thanks to the nature of the Uhura framework, more adapters can be implemented to manage communication between the two layers.

The project is still under development. Refer to papers or PhD thesis for more details.

Leonardo Montecchiari Ph.D Thesis

Installation and Deployment Example

The best way is to use the all-in-one Dockerfile where a Uhura cluster over NATS.io can be easily deployed.

First, download this repo and then navigate inside the src folder. At this point, build the image using the following command:

docker build -t uhura -f uhura.Dockerfile .

This container will run a NATS server, a Uhura core, and an adapter over TCP/IP based on Zenoh protocol so will run a peer as well.

Now, decide how many Uhura instances are needed for your test. As a first test, consider implementing a simple sender/receiver like the one inside the src/nats/example folder.

Since Zenoh uses Multicast as default scouting mode, we dont need to create a cluster but instead we must put all the containers in the same bridge network. So create one network like this:

docker network create --driver bridge uhura-multicast-network 

Let's run them with the following commands:

For the Sender
docker run -e "NATS_SERVER_ADDRESS=0.0.0.0:4222" -e "ID=SENDER" -e "NATS_CLUSTER_PORT=6222" -e "ROUTES=" -e "UHURA_CORE_ID=SENDER" -p 4222:4222 --network uhura-multicast-network --name sender_nats --rm uhura
For the Receiver
docker run -e "NATS_SERVER_ADDRESS=0.0.0.0:4222" -e "ID=RECEIVER" -e "NATS_CLUSTER_PORT=6222" -e "ROUTES=" -e "UHURA_CORE_ID=RECEIVER" -p 4222:4222 --network uhura-multicast-network --name receiver_nats --rm uhura

Where:

  • NATS_SERVER_ADDRESS specifies the internal input connections for NATS
  • ID is the NATS server ID, SENDER and RECEIVER in our case.
  • NATS_CLUSTER_PORT is needed to connect the cluster on the same network.
  • ROUTES is needed when we want to create a cluster, specifying an online server. The sender is our first server, so the receiver can connect to it. It is needed only for the startup for discovery purposes.
  • UHURA_CORE_ID Uhura has its own ID over the cluster, needed for clients and adapters.

Then, we need to expose the ports, forwarding port 4222 for each new Uhura instance, as well as the cluster port 6222.

Now, simply install Node.js and then run npm init inside the src/nats/example folder.

Finally, run node sender.js and node receiver.js, or alternatively, use another NATS-client compatible approach.

This is a very basic setup. From this, it is possible to customize Uhura using multiple adapters or even the Service Discovery system.

uhura's People

Contributors

patonz avatar

Stargazers

 avatar

Watchers

 avatar

uhura's Issues

GUI

GUI For Basestations.
Eventually can support remote log streams

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.