GithubHelp home page GithubHelp logo

mkrizmancic / sphero_formation Goto Github PK

View Code? Open in Web Editor NEW
16.0 3.0 3.0 140 KB

Python / ROS implementation of Reynolds flocking algorithm. Simulation and real-world usage on Sphero SPRK+ robots.

Home Page: https://www.youtube.com/playlist?list=PLPiKSV7BqbsZcMZir4M2gN9oI02NTkEvi

License: MIT License

CMake 13.49% Python 82.89% Assembly 1.53% Shell 2.10%
reynolds boids sphero flocking formation-control ros

sphero_formation's Introduction

About

This repository contains algorithms developed for the student paper proposed for Rector's award at University of Zagreb.

Title: Decentralized formation control for a multi-agent system of autonomous spherical robots

Authors: Antonella Barišić, Marko Križmančić

Abstract: In this work, a decentralized control algorithm based on Reynolds' rules is implemented on a multi-agent system of spherical robots. The algorithm procedurally generates motion patterns that resemble those characteristic for flocks of birds or schools of fish. Generated motion patterns allow robots to move in a closed space with static obstacles. A Bluetooth driver for controlling the robots has also been developed. The complete system is implemented using the ROS framework and Python programming language. The results of this work are demonstrated with experiments in a simulated environment, as well as in the real world using Sphero SPRK+ robots localized with OptiTrack.

IMPORTANT NOTICE:

I recently started a reorganization of the repository and the current version is be broken (unavailable outside packages are necessary). Unfortunately, I can't say when that might get fixed. In the meantime, check out an older version when everything was still in the same place: https://github.com/mkrizmancic/sphero_formation/tree/0ac14aad3dd1a0af26f191c017e213279eebd52e

Installation

Simply clone this repository inside ROS workspace and run catkin build in workspace root.

Simulation part uses stage_ros simulator.

If you wish to use this with Sphero robots, you must also download this repository: https://github.com/antonellabarisic/sphero_sprk_ros.

OptiTrack is used for localization of robots. However, Spheros cannot be equipped with tracking markers, so only their LEDs are used for tracking. Each Sphero shows up as a single marker. In order to stream positions of single markers, you must also download this repository: https://github.com/mkrizmancic/mocap_optitrack/tree/new-and-old-support-updated.

Usage

Simulation:

  1. Set values for all desired parameters inside launch/setup_sim.launch.
  2. Set initial velocities in cfg/sphero_init_vel.cfg.
  3. In first terminal run roscore (optional)
  4. In second terminal run roslaunch sphero_formation setup_sim.launch
  5. In third terminal run roslaunch sphero_formation reynolds_sim.launch

Real world:

  1. Set number of robots used in launch/drivers.launch.
    (First n robots defined with MAC addresses in sphero_addresses.txt will be used.)
  2. Set values for all other desired parameters inside launch/setup_real.launch.
  3. Set initial velocities in cfg/sphero_init_vel.cfg.
  4. In first terminal run roscore (optional)
  5. In second terminal run roslaunch sphero_formation drivers.launch
  6. In third terminal run roslaunch sphero_formation setup_real.launch
  7. In fourth terminal run roslaunch sphero_formation tracking.launch
  8. In fifth terminal run roslaunch sphero_formation flocking.launch

Flocking algorithm parameters can be changed during runtime with rqt_reconfigure. GUI for changing parameters is launched from setup_*.launch files.

Manual control:

Robots can be controlled manually with Logitech F710 joystick.

TODO: specify button mappings

sphero_formation's People

Contributors

deepsource-io[bot] avatar mkrizmancic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

sphero_formation's Issues

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.