GithubHelp home page GithubHelp logo

kr1zzo / consensus-protocol-swarm-control Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bornaparo/mrs_project2_simulation

2.0 0.0 0.0 59 KB

This repository is a part of the Multi-Robot Systems project at the Faculty of Electrical Engineering and Computing, University of Zagreb.

Python 68.53% CMake 31.47%
consensus-protocol multirobot-systems docker python

consensus-protocol-swarm-control's Introduction

Multi-robot systems: Controlling a Swarm using Consensus Protocol

Multi-Robot systems course project

Faculty of Electrical Engineering and Computing in Zagreb

2023./2024.

Start Docker Container

In one terminal copy/paste :

sudo  docker  start  -i  mrs_project_2

In other terminal copy/paste

sudo  docker  exec  -it  mrs_project_2  bash

your terminal prompt should change from

<your username>@<your hostname>

to

developer@<your  hostname>

This signals that you are currently "inside" the container.

Clone and build the project

  • Clone this project in: ~/catkin_ws/src
git  clone  https://github.com/bornaparo/mrs_project2_simulation.git
  • Build: $: ~/catkin_ws/
catkin  build

Modification

Delete everything from /home/developer/catkin_ws/src/sphero_simulation/sphero_stage/launch directory and paste into it everything from /home/developer/catkin_ws/src/mrs_project2_simulation/launch_for_sphero directory

Communication

Who can communicate with whom is defined as adjacency matrix in .txt file where elements in column are delimited by space, size of the matrix is NxN where N is the number of robots in the simulation. Row sends messages to column. For example, adjacency matrix:

0 1 0
0 0 1
1 0 0

Describes that first robot sends messages to the second, second sends messages to the third, and third sends messages to the first. This formation is shown in image below:

Formation

Formation is also defined in .txt file as matrix where columns are delimited by space. Size of the matrix is Nx2 where N is the number of robots in simulation, number of columns is 2 which corresponds to the x and y coordinate of the i-th robot.

For example:

0 0
1 0
0.5 1

Defines that first robots will go to coordinates (0,0), second to (1,0) and third to (0.5,1) and they will form triangle (in this formation). Robots will keep relative distance between each other as defined in formation file, if the matrix in formation file has all zeros, robots will perform rendezvous and they will collide with each other.

Note: number of robots N needs to be the same in adjacency matrix and formation matrix

Launch example

roslaunch mrs_project2_simulation empty_map_square_leader_launch.launch

If the leader exists (defined as parameter in launch file), you can set goal position which formation needs to achieve, for example:

rosservice call /set_goal_position "x: 3.0
y: -3.0"

Videos:

Simple Maze Map Consensus protocol square formation

Consensus-based rendevouz1

Consensus-based rendevouz2

Consensus-based line formation

Consensus-based square formation

Consensus-based triangle formation

Simple maze map consensus protocol triangle formation

Simple maze map consensus protocol line formation

consensus-protocol-swarm-control's People

Contributors

bornaparo avatar kr1zzo avatar peteheat08 avatar

Stargazers

Varun Rayamajhi avatar  avatar

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.